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

29 lines
811 B
YAML
Raw Normal View History

- name: Does /usr/libexec/iiab-startup.sh exist?
2018-01-11 00:36:38 +00:00
stat:
path: /usr/libexec/iiab-startup.sh
register: startup_script
2018-01-11 00:36:38 +00:00
- name: Copy template script to /usr/libexec/iiab-startup.sh
template:
src: iiab-startup.sh
dest: /usr/libexec/
mode: 0755
when: not startup_script.stat.exists
- name: Copy iiab-startup.service to {{ systemd_location }}
template:
src: iiab-startup.service
dest: "{{ systemd_location }}"
when: not startup_script.stat.exists
- name: Enable & restart the systemd service after daemon-reload
2018-01-11 00:36:38 +00:00
# shell: systemctl daemon-reload
# shell: systemctl restart iiab-startup.service
# shell: systemctl enable iiab-startup.service
systemd:
name: iiab-startup
daemon_reload: yes
2018-01-11 00:36:38 +00:00
enabled: yes
state: restarted
when: not startup_script.stat.exists