Debian Codegraph @

test/integration/targets/service/tasks/systemd_cleanup.yml

raw
1 - name: remove the systemd unit file
2 file: path=/usr/lib/systemd/system/ansible_test.service state=absent
3 register: remove_systemd_result
4
5 - name: remove the systemd unit file
6 file: path=/usr/lib/systemd/system/ansible_test_broken.service state=absent
7 register: remove_systemd_broken_result
8
9 - debug: var=remove_systemd_broken_result
10 - name: assert that the systemd unit file was removed
11 assert:
12 that:
13 - "remove_systemd_result.path == '/usr/lib/systemd/system/ansible_test.service'"
14 - "remove_systemd_result.state == 'absent'"
15 - "remove_systemd_broken_result.path == '/usr/lib/systemd/system/ansible_test_broken.service'"
16 - "remove_systemd_broken_result.state == 'absent'"
17
18 - name: make sure systemd is reloaded
19 shell: systemctl daemon-reload
20 register: restart_systemd_result
21
22 - name: assert that systemd was reloaded
23 assert:
24 that:
25 - "restart_systemd_result.rc == 0"