feat(ansible): Ajoute la gestion du mode maintenance via commande et listener.

This commit is contained in:
Serreau Jovann
2025-11-13 10:26:01 +01:00
parent 2a948c1099
commit 8ad67ef46b
4 changed files with 167 additions and 1 deletions

View File

@@ -65,7 +65,16 @@
state: started
enabled: yes
when: ansible_os_family == "Debian"
- name: Maintenance mode artemis on
ansible.builtin.command: php bin/console mainframe:maintenance artemis true
become: false
args:
chdir: "{{ path }}"
- name: Maintenance mode api on
ansible.builtin.command: php bin/console mainframe:maintenance api true
become: false
args:
chdir: "{{ path }}"
- name: Créer le fichier .env.local avec les secrets de production
ansible.builtin.copy:
content: |
@@ -292,3 +301,13 @@
- "{{ path }}/public/media"
- "{{ path }}/public/storage" # For uploads
- "{{ path }}/public/tmp-sign" # For uploads
- name: Maintenance mode artemis off
ansible.builtin.command: php bin/console mainframe:maintenance artemis false
become: false
args:
chdir: "{{ path }}"
- name: Maintenance mode api off
ansible.builtin.command: php bin/console mainframe:maintenance api false
become: false
args:
chdir: "{{ path }}"