-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathwebproxyservers.yml
43 lines (42 loc) · 1.18 KB
/
webproxyservers.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# file: webproxyservers.yml
#
---
- hosts: webproxy
roles:
- { role: rsyslog-pgsql, tags: [rsyslog-pgsql, nginx] }
- { role: nginx, tags: nginx }
tasks:
- name: Set Maintenance Locations
set_fact:
maintenance_locations: "['roles','registry','oidc','proxy']"
tags:
- nginx:maintenance_on
- nginx:maintenance_off
- never
- name: Enter Maintenance Mode
copy:
content: ""
dest: "/var/www/html/{{ item }}.maintenance.enable"
force: no
owner: root
mode: 0644
loop: "{{ maintenance | default(maintenance_locations) | default([]) }}"
loop_control:
label: "Add control file for Maintenance Mode {{ item }}"
become: yes
ignore_errors: yes
tags:
- nginx:maintenance_on
- never
- name: Exit Maintenance Mode
file:
path: "/var/www/html/{{ item }}.maintenance.enable"
state: absent
loop: "{{ maintenance_locations | default([]) }}"
loop_control:
label: "Removing control file for Maintenance Mode {{ item }}"
become: yes
ignore_errors: yes
tags:
- nginx:maintenance_off
- never