You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/service_facts/tasks/systemd_setup.yml

27 lines
770 B
YAML

- name: install the test daemon script
copy:
src: ansible_test_service.py
dest: /usr/sbin/ansible_test_service
mode: '755'
- name: rewrite shebang in the test daemon script
lineinfile:
path: /usr/sbin/ansible_test_service
line: "#!{{ ansible_python_interpreter | realpath }}"
insertbefore: BOF
firstmatch: yes
- name: install the systemd unit file
copy:
src: ansible.systemd
dest: /etc/systemd/system/ansible_test.service
mode: '0644'
register: install_systemd_result
- name: assert that the systemd unit file was installed
assert:
that:
- "install_systemd_result.dest == '/etc/systemd/system/ansible_test.service'"
- "install_systemd_result.state == 'file'"
- "install_systemd_result.mode == '0644'"