1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[test_service] correct upstart service name and permissions

The 'service' utility was unable to find the 'ansible_test' service due to an
unexpected filename.  This patch corrects the filename and adjusts the
permissions to match other service scripts within /etc/init/.
This commit is contained in:
James Laska 2014-03-07 10:41:01 -05:00
parent f80d02d841
commit c7d1c1a306
2 changed files with 5 additions and 5 deletions
test/integration/roles/test_service/tasks

View file

@ -1,10 +1,10 @@
- name: remove the upstart init file - name: remove the upstart init file
file: path=/etc/init/ansible_test state=absent file: path=/etc/init/ansible_test.conf state=absent
register: remove_upstart_result register: remove_upstart_result
- name: assert that the upstart init file was removed - name: assert that the upstart init file was removed
assert: assert:
that: that:
- "remove_upstart_result.path == '/etc/init/ansible_test'" - "remove_upstart_result.path == '/etc/init/ansible_test.conf'"
- "remove_upstart_result.state == 'absent'" - "remove_upstart_result.state == 'absent'"

View file

@ -1,12 +1,12 @@
- name: install the upstart init file - name: install the upstart init file
copy: src=ansible.upstart dest=/etc/init/ansible_test mode=0755 copy: src=ansible.upstart dest=/etc/init/ansible_test.conf mode=0644
register: install_upstart_result register: install_upstart_result
- name: assert that the upstart init file was installed - name: assert that the upstart init file was installed
assert: assert:
that: that:
- "install_upstart_result.dest == '/etc/init/ansible_test'" - "install_upstart_result.dest == '/etc/init/ansible_test.conf'"
- "install_upstart_result.state == 'file'" - "install_upstart_result.state == 'file'"
- "install_upstart_result.mode == '0755'" - "install_upstart_result.mode == '0644'"
- "install_upstart_result.md5sum == 'ab3900ea4de8423add764c12aeb90c01'" - "install_upstart_result.md5sum == 'ab3900ea4de8423add764c12aeb90c01'"