Debian Codegraph @

test/integration/targets/service_facts/tasks/systemd_setup.yml

raw
1 - name: install the test daemon script
2 copy:
3 src: ansible_test_service.py
4 dest: /usr/sbin/ansible_test_service
5 mode: '755'
6 notify: 'clean up service_facts'
7
8 - name: rewrite shebang in the test daemon script
9 lineinfile:
10 path: /usr/sbin/ansible_test_service
11 line: "#!{{ ansible_python_interpreter | realpath }}"
12 insertbefore: BOF
13 firstmatch: yes
14
15 - name: install the systemd unit file
16 copy:
17 src: ansible.systemd
18 dest: /etc/systemd/system/ansible_test.service
19 mode: '0644'
20 register: install_systemd_result
21
22 - name: assert that the systemd unit file was installed
23 assert:
24 that:
25 - "install_systemd_result.dest == '/etc/systemd/system/ansible_test.service'"
26 - "install_systemd_result.state == 'file'"
27 - "install_systemd_result.mode == '0644'"