mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2025-01-18 08:06:16 +01:00
Convert the permissions to strings to avoid octal interpretation. Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
- name: Create the maintenance logs dir
|
|
file: path={{ maintenance_logs_dir }} state=directory owner=root group=root mode=0755
|
|
|
|
- name: Create the maintenance http dir
|
|
file: path={{ maintenance_http_dir }} state=directory owner=root group=root mode=0755
|
|
|
|
- name: Create the service http root dir
|
|
file: path={{ maintenance_http_dir }}/{{ service_domain }} state=directory owner=root group=root mode=0755
|
|
when: maintenance is defined and maintenance | bool
|
|
|
|
- name: Set up nginx maintenance mode
|
|
template:
|
|
src: nginx-maintenance.conf.j2
|
|
dest: "{{ service_nginx_conf }}"
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
notify: Reload nginx
|
|
when: service_nginx_template is not defined and maintenance is defined and maintenance | bool
|
|
|
|
- name: Set up custom nginx maintenance mode
|
|
template:
|
|
src: "{{ service_nginx_template }}"
|
|
dest: "{{ service_nginx_conf }}"
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
notify: Reload nginx
|
|
when: service_nginx_template is defined and maintenance is defined and maintenance | bool
|
|
|
|
- name: Create the 503 html file
|
|
template:
|
|
src: 503.html.j2
|
|
dest: "{{ maintenance_http_dir }}/{{ service_domain }}/503.html"
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
when: maintenance is defined and maintenance | bool
|
|
|
|
- name: Force reload nginx
|
|
meta: flush_handlers
|