Skip to content
Snippets Groups Projects
Commit 6892a2ef authored by Jörg Sachse's avatar Jörg Sachse
Browse files

refactor: move tasks for configuring ZIH maintenance window into separate...

refactor: move tasks for configuring ZIH maintenance window into separate tasks file and assign useful tags
parent c98aacf3
No related branches found
No related tags found
No related merge requests found
Pipeline #6780 passed
---
# ZIH has monthly maintenance windows for their VMware environment, which also
# affects the Library Manager VMs used by SLUBArchiv.digital. This time window
# is also used for upgrading the OS and IBM packages on the storage servers. To
# make sure that there is no write/read access during that time, we shutdown
# the DisApp and SubApp and start them afterwards using systemd timers.
- name: create directory for SystemD units
ansible.builtin.file:
path: "/usr/local/lib/systemd/system/"
mode: "0755"
state: directory
owner: "root"
group: "root"
- name: install SubApp/DisApp maintenance services and timers
ansible.builtin.template:
src: "usr/local/lib/systemd/system/{{ item }}.j2"
dest: "/usr/local/lib/systemd/system/{{ item }}"
mode: "0644"
owner: "root"
group: "root"
loop:
- "disapp_maintenance_begin.service"
- "disapp_maintenance_begin.timer"
- "disapp_maintenance_end.timer"
- "subapp_maintenance_begin.service"
- "subapp_maintenance_begin.timer"
- "subapp_maintenance_end.timer"
- name: enable SubApp/DisApp maintenance services and timers
ansible.builtin.systemd:
name: "{{ item.name }}"
enabled: "{{ item.enabled | default(true) }}"
state: "{{ item.state | default('started') }}"
daemon_reload: true
loop:
- name: "disapp_maintenance_begin.service"
state: "stopped"
- name: "disapp_maintenance_begin.timer"
- name: "disapp_maintenance_end.timer"
- name: "subapp_maintenance_begin.service"
state: "stopped"
- name: "subapp_maintenance_begin.timer"
- name: "subapp_maintenance_end.timer"
......@@ -213,48 +213,3 @@
dest: "/home/{{ vault_subapp_user }}/.subapp/subapp_ws_logs"
owner: "{{ vault_subapp_user }}"
group: "{{ vault_subapp_group }}"
# ZIH has monthly maintenance windows for their VMware environment, which also
# affects the Library Manager VMs used by SLUBArchiv.digital. This time window
# is also used for upgrading the OS and IBM packages on the storage servers. To
# make sure that there is no write/read access during that time, we shutdown
# the DisApp and SubApp and start them afterwards using systemd timers.
- name: create directory for SystemD units
ansible.builtin.file:
path: "/usr/local/lib/systemd/system/"
mode: "0755"
state: directory
owner: "root"
group: "root"
tags: [ maintenance_window ]
- name: install SubApp/DisApp maintenance services and timers
ansible.builtin.template:
src: "usr/local/lib/systemd/system/{{ item }}.j2"
dest: "/usr/local/lib/systemd/system/{{ item }}"
mode: "0644"
owner: "root"
group: "root"
loop:
- "disapp_maintenance_begin.service"
- "disapp_maintenance_begin.timer"
- "disapp_maintenance_end.timer"
- "subapp_maintenance_begin.service"
- "subapp_maintenance_begin.timer"
- "subapp_maintenance_end.timer"
tags: [ maintenance_window ]
- name: enable SubApp/DisApp maintenance services and timers
ansible.builtin.systemd:
name: "{{ item.name }}"
enabled: "{{ item.enabled | default(true) }}"
state: "{{ item.state | default('started') }}"
daemon_reload: true
loop:
- name: "disapp_maintenance_begin.service"
state: "stopped"
- name: "disapp_maintenance_begin.timer"
- name: "disapp_maintenance_end.timer"
- name: "subapp_maintenance_begin.service"
state: "stopped"
- name: "subapp_maintenance_begin.timer"
- name: "subapp_maintenance_end.timer"
tags: [ maintenance_window ]
......@@ -48,6 +48,10 @@
ansible.builtin.import_tasks: "install_subapp.yml"
tags: [subapp]
- name: configure SubApp/DisApp maintenance timer
ansible.builtin.import_tasks: "configure_maintenance.yml"
tags: [subapp, maintenance, systemd, timer, cron, cronjob]
- name: Userbezogene Konfiguration für User processing einspielen
ansible.builtin.import_tasks: "configure_processing_user.yml"
tags: [users, bash]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment