1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

condition on /usr/libexec/iiab-startup.sh (NOT unit file!)

This commit is contained in:
A Holt 2018-01-10 20:26:52 -05:00 committed by GitHub
parent e8a781230c
commit 847a49917f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,20 +1,20 @@
- name: Does systemd iiab-startup.service exist?
- name: Does /usr/libexec/iiab-startup.sh exist?
stat:
path: "{{ systemd_location }}/iiab-startup.service"
register: startup_unit
- name: Copy iiab-startup.service to /etc/systemd/system
template:
src: iiab-startup.service
dest: /etc/systemd/system/
when: not startup_unit.stat.exists
path: /usr/libexec/iiab-startup.sh
register: startup_script
- 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
when: not startup_script.stat.exists
- name: Copy iiab-startup.service to /etc/systemd/system
template:
src: iiab-startup.service
dest: "{{ systemd_location }}"
when: not startup_script.stat.exists
- name: Enable & restart the systemd service after daemon-reload
# shell: systemctl daemon-reload
@ -25,4 +25,4 @@
daemon_reload: yes
enabled: yes
state: restarted
when: not startup_unit.stat.exists
when: not startup_script.stat.exists