2018-01-11 01:26:52 +00:00
|
|
|
- name: Does /usr/libexec/iiab-startup.sh exist?
|
2018-01-11 00:36:38 +00:00
|
|
|
stat:
|
2018-01-11 01:26:52 +00:00
|
|
|
path: /usr/libexec/iiab-startup.sh
|
|
|
|
register: startup_script
|
2017-11-24 16:57:46 +00:00
|
|
|
|
2018-10-31 01:40:59 +00:00
|
|
|
- name: If not, install /usr/libexec/iiab-startup.sh from template
|
2018-01-11 00:36:38 +00:00
|
|
|
template:
|
|
|
|
src: iiab-startup.sh
|
2018-10-31 01:44:37 +00:00
|
|
|
path: /usr/libexec/
|
2018-01-11 00:36:38 +00:00
|
|
|
mode: 0755
|
2018-01-11 01:26:52 +00:00
|
|
|
when: not startup_script.stat.exists
|
|
|
|
|
2018-10-31 01:40:59 +00:00
|
|
|
- name: Install {{ systemd_location }}/iiab-startup.service from template
|
2018-01-11 01:26:52 +00:00
|
|
|
template:
|
|
|
|
src: iiab-startup.service
|
2018-10-31 01:44:37 +00:00
|
|
|
path: "{{ systemd_location }}"
|
2018-01-11 01:26:52 +00:00
|
|
|
when: not startup_script.stat.exists
|
2017-11-24 16:57:46 +00:00
|
|
|
|
2018-10-31 01:40:59 +00:00
|
|
|
- name: Enable & restart systemd service (iiab-startup) 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
|
2018-01-11 01:06:20 +00:00
|
|
|
systemd:
|
|
|
|
name: iiab-startup
|
|
|
|
daemon_reload: yes
|
2018-01-11 00:36:38 +00:00
|
|
|
enabled: yes
|
2018-01-11 01:09:35 +00:00
|
|
|
state: restarted
|
2018-01-11 01:26:52 +00:00
|
|
|
when: not startup_script.stat.exists
|