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:
parent
e8a781230c
commit
847a49917f
1 changed files with 11 additions and 11 deletions
|
@ -1,20 +1,20 @@
|
||||||
- name: Does systemd iiab-startup.service exist?
|
- name: Does /usr/libexec/iiab-startup.sh exist?
|
||||||
stat:
|
stat:
|
||||||
path: "{{ systemd_location }}/iiab-startup.service"
|
path: /usr/libexec/iiab-startup.sh
|
||||||
register: startup_unit
|
register: startup_script
|
||||||
|
|
||||||
- name: Copy iiab-startup.service to /etc/systemd/system
|
|
||||||
template:
|
|
||||||
src: iiab-startup.service
|
|
||||||
dest: /etc/systemd/system/
|
|
||||||
when: not startup_unit.stat.exists
|
|
||||||
|
|
||||||
- name: Copy template script to /usr/libexec/iiab-startup.sh
|
- name: Copy template script to /usr/libexec/iiab-startup.sh
|
||||||
template:
|
template:
|
||||||
src: iiab-startup.sh
|
src: iiab-startup.sh
|
||||||
dest: /usr/libexec/
|
dest: /usr/libexec/
|
||||||
mode: 0755
|
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
|
- name: Enable & restart the systemd service after daemon-reload
|
||||||
# shell: systemctl daemon-reload
|
# shell: systemctl daemon-reload
|
||||||
|
@ -25,4 +25,4 @@
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: restarted
|
state: restarted
|
||||||
when: not startup_unit.stat.exists
|
when: not startup_script.stat.exists
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue