mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
iiab-startup.yml clarifications
This commit is contained in:
parent
15e3b4726f
commit
d6a51cb175
1 changed files with 22 additions and 17 deletions
|
@ -1,26 +1,31 @@
|
||||||
- name: Does systemd startup service exist
|
- name: Does systemd iiab-startup.service exist?
|
||||||
stat: path="{{ systemd_location }}/iiab-startup.service"
|
stat:
|
||||||
|
path: "{{ systemd_location }}/iiab-startup.service"
|
||||||
register: startup_unit
|
register: startup_unit
|
||||||
|
|
||||||
- name: Copy startup service to /etc/systemd/system
|
- name: Copy iiab-startup.service to /etc/systemd/system
|
||||||
template: src=iiab-startup.service
|
template:
|
||||||
dest=/etc/systemd/system/
|
src: iiab-startup.service
|
||||||
|
dest: /etc/systemd/system/
|
||||||
when: startup_unit.stat.exists is defined and not startup_unit.stat.exists
|
when: startup_unit.stat.exists is defined and not startup_unit.stat.exists
|
||||||
|
|
||||||
- name: Copy startup script
|
- name: Copy template script to /usr/libexec/iiab-startup.sh
|
||||||
template: src=iiab-startup.sh
|
template:
|
||||||
dest=/usr/libexec/
|
src: iiab-startup.sh
|
||||||
mode=0755
|
dest: /usr/libexec/
|
||||||
|
mode: 0755
|
||||||
when: startup_unit.stat.exists is defined and not startup_unit.stat.exists
|
when: startup_unit.stat.exists is defined and not startup_unit.stat.exists
|
||||||
|
|
||||||
- name: Ask systemd to recognize the changes
|
- name: Do a systemd daemon-reload
|
||||||
shell: systemctl daemon-reload
|
# shell: systemctl daemon-reload
|
||||||
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
when: startup_unit.stat.exists is defined and not startup_unit.stat.exists
|
when: startup_unit.stat.exists is defined and not startup_unit.stat.exists
|
||||||
|
|
||||||
- name: Restart so systemd recognizes the changes
|
- name: Enable & restart the systemd service
|
||||||
shell: systemctl restart iiab-startup.service
|
# shell: systemctl restart iiab-startup.service
|
||||||
when: startup_unit.stat.exists is defined and not startup_unit.stat.exists
|
# shell: systemctl enable iiab-startup.service
|
||||||
|
service:
|
||||||
- name: Enable the reload service
|
enabled: yes
|
||||||
shell: systemctl enable iiab-startup.service
|
restarted: yes
|
||||||
when: startup_unit.stat.exists is defined and not startup_unit.stat.exists
|
when: startup_unit.stat.exists is defined and not startup_unit.stat.exists
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue