| 1 |
--- |
| 2 |
- name: Test this playbook |
| 3 |
hosts: all |
| 4 |
tasks: |
| 5 |
- name: Gather all legacy facts |
| 6 |
cisco.ios.ios_facts: |
| 7 |
|
| 8 |
- name: Update modification and access time of given file |
| 9 |
ansible.builtin.file: |
| 10 |
path: /etc/some_file |
| 11 |
state: file |
| 12 |
modification_time: now |
| 13 |
access_time: now |
| 14 |
|
| 15 |
|
| 16 |
- name: Disable ufw service |
| 17 |
ansible.builtin.service: |
| 18 |
name: ufw |
| 19 |
enabled: false |
| 20 |
state: stopped |
| 21 |
when: '"ufw" in services' |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
- name: Remove file (delete file) |
| 26 |
ansible.builtin.file: |
| 27 |
path: /etc/foo.txt |
| 28 |
state: absent |