mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
always stop the service before upgrading/restart
This commit is contained in:
parent
6db2df873e
commit
3f61470543
1 changed files with 19 additions and 15 deletions
|
@ -37,12 +37,6 @@
|
||||||
internetarchive_upgrade: True
|
internetarchive_upgrade: True
|
||||||
when: reinstall is defined
|
when: reinstall is defined
|
||||||
|
|
||||||
- name: 'Update pre-existing install: sudo yarn upgrade'
|
|
||||||
command: sudo yarn upgrade
|
|
||||||
args:
|
|
||||||
chdir: "{{ internetarchive_dir }}"
|
|
||||||
when: not internetarchive_installing.changed and internetarchive_upgrade
|
|
||||||
|
|
||||||
|
|
||||||
# CONFIG FILES
|
# CONFIG FILES
|
||||||
|
|
||||||
|
@ -71,7 +65,25 @@
|
||||||
when: is_debuntu and not internetarchive_enabled
|
when: is_debuntu and not internetarchive_enabled
|
||||||
|
|
||||||
|
|
||||||
# RESTART/STOP SYSTEMD SERVICE
|
# STOP SYSTEMD SERVICE
|
||||||
|
- name: Stop 'internetarchive' systemd service
|
||||||
|
systemd:
|
||||||
|
name: internetarchive
|
||||||
|
daemon_reload: yes
|
||||||
|
state: stopped
|
||||||
|
|
||||||
|
- name: 'Update pre-existing install: sudo yarn upgrade'
|
||||||
|
command: sudo yarn upgrade
|
||||||
|
args:
|
||||||
|
chdir: "{{ internetarchive_dir }}"
|
||||||
|
when: not internetarchive_installing.changed and internetarchive_upgrade
|
||||||
|
|
||||||
|
# RESTART/ENABLE SYSTEMD SERVICE
|
||||||
|
- name: Disable 'internetarchive' systemd service (if not internetarchive_enabled)
|
||||||
|
systemd:
|
||||||
|
name: internetarchive
|
||||||
|
enabled: no
|
||||||
|
when: not internetarchive_enabled
|
||||||
|
|
||||||
# with "systemctl daemon-reload" in case mongodb.service changed, etc
|
# with "systemctl daemon-reload" in case mongodb.service changed, etc
|
||||||
- name: Enable & Restart 'internetarchive' systemd service (if internetarchive_enabled)
|
- name: Enable & Restart 'internetarchive' systemd service (if internetarchive_enabled)
|
||||||
|
@ -82,14 +94,6 @@
|
||||||
state: restarted
|
state: restarted
|
||||||
when: internetarchive_enabled | bool
|
when: internetarchive_enabled | bool
|
||||||
|
|
||||||
- name: Disable & Stop 'internetarchive' systemd service (if not internetarchive_enabled)
|
|
||||||
systemd:
|
|
||||||
name: internetarchive
|
|
||||||
daemon_reload: yes
|
|
||||||
enabled: no
|
|
||||||
state: stopped
|
|
||||||
when: not internetarchive_enabled
|
|
||||||
|
|
||||||
- name: Restart Apache service ({{ apache_service }}) to enable/disable http://box/archive (not just http://box:{{ internetarchive_port }})
|
- name: Restart Apache service ({{ apache_service }}) to enable/disable http://box/archive (not just http://box:{{ internetarchive_port }})
|
||||||
systemd:
|
systemd:
|
||||||
name: "{{ apache_service }}" # httpd or apache2
|
name: "{{ apache_service }}" # httpd or apache2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue