1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-15 04:32:11 +00:00
iiab/roles/2-common/tasks/iiab-startup.yml

32 lines
852 B
YAML
Raw Normal View History

2018-01-11 00:36:38 +00:00
- name: Does systemd iiab-startup.service exist?
stat:
path: "{{ systemd_location }}/iiab-startup.service"
register: startup_unit
2018-01-11 00:36:38 +00:00
- name: Copy iiab-startup.service to /etc/systemd/system
template:
src: iiab-startup.service
dest: /etc/systemd/system/
when: not startup_unit.stat.exists
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_unit.stat.exists
2018-01-11 00:36:38 +00:00
- name: Do a systemd daemon-reload
# shell: systemctl daemon-reload
systemd:
daemon_reload: yes
when: not startup_unit.stat.exists
2018-01-11 00:36:38 +00:00
- name: Enable & restart the systemd service
# shell: systemctl restart iiab-startup.service
# shell: systemctl enable iiab-startup.service
service:
enabled: yes
restarted: yes
when: not startup_unit.stat.exists