1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/2-common/tasks/iiab-startup.yml
2018-10-31 00:01:22 -04:00

28 lines
842 B
YAML

- name: Does /usr/libexec/iiab-startup.sh exist?
stat:
path: /usr/libexec/iiab-startup.sh
register: startup_script
- name: If not, install /usr/libexec/iiab-startup.sh from template
template:
src: iiab-startup.sh
dest: /usr/libexec/
mode: 0755
when: not startup_script.stat.exists
- name: Install {{ systemd_location }}/iiab-startup.service from template
template:
src: iiab-startup.service
dest: "{{ systemd_location }}"
when: not startup_script.stat.exists
- name: Enable & restart systemd service (iiab-startup) after daemon-reload
# shell: systemctl daemon-reload
# shell: systemctl restart iiab-startup.service
# shell: systemctl enable iiab-startup.service
systemd:
name: iiab-startup
daemon_reload: yes
enabled: yes
state: restarted
when: not startup_script.stat.exists