39182552ef
* service tests: check that daemon is really running
(spoiler: it isn't)
* service tests: add PIDFile directive in systemd unit
* service tests: check 'changed' too
* service tests: fix indentation & use changed test
* service tests: #16694 has been fixed a long time ago
* service tests: refactor
- always execute cleaning tasks
- move tests tasks in a dedicated file
* service tests: add test for #42786
* service tests: display value of ansible_service_mgr
* service tests: allow to run tests twice in a row
stop & disable ansible test service
* service tests: 'pattern' value must be a substring
'pattern' parameter is poorly named
* service tests: check ansible_test service status
* service tests: test daemon must handle SIGHUP
because 'initctl reload' sends SIGHUP, otherwise test daemon stops when
receiving the signal
* service tests: remove upstart override file too
and check that files were removed using raw module and stat command
(cherry picked from commit c5f37f6bd6
)
17 lines
485 B
YAML
17 lines
485 B
YAML
- vars:
|
||
upstart_files:
|
||
- /etc/init/ansible_test.conf
|
||
- /etc/init/ansible_test.override
|
||
- /etc/init/ansible_test_broken.conf
|
||
block:
|
||
- name: remove upstart init files
|
||
file:
|
||
path: '{{ item }}'
|
||
state: absent
|
||
loop: '{{ upstart_files }}'
|
||
|
||
- name: assert that upstart init files were removed
|
||
raw: 'test -e {{ item }}'
|
||
loop: '{{ upstart_files }}'
|
||
register: file_exists
|
||
failed_when: file_exists is not failed
|