From f85d359de00019d8f9ac45c759bf51b11d19a53a Mon Sep 17 00:00:00 2001 From: Robin Portigliatti Date: Fri, 2 Feb 2024 10:37:56 +0100 Subject: [PATCH] Ajout des playbooks ansible et correction nom --- .../ansible/ansible.cfg | 7 +++++ .../ansible/install.yml | 31 +++++++++++++++++++ .../ansible/install_pg.sh | 1 + .../ansible/install_pgbackrest.sh | 1 + .../ansible/inventory | 19 ++++++++++++ fr/pgbackrest_dans_tous_ses_etats/workshop.md | 2 +- 6 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 fr/pgbackrest_dans_tous_ses_etats/ansible/ansible.cfg create mode 100644 fr/pgbackrest_dans_tous_ses_etats/ansible/install.yml create mode 120000 fr/pgbackrest_dans_tous_ses_etats/ansible/install_pg.sh create mode 120000 fr/pgbackrest_dans_tous_ses_etats/ansible/install_pgbackrest.sh create mode 100644 fr/pgbackrest_dans_tous_ses_etats/ansible/inventory diff --git a/fr/pgbackrest_dans_tous_ses_etats/ansible/ansible.cfg b/fr/pgbackrest_dans_tous_ses_etats/ansible/ansible.cfg new file mode 100644 index 0000000..95fc529 --- /dev/null +++ b/fr/pgbackrest_dans_tous_ses_etats/ansible/ansible.cfg @@ -0,0 +1,7 @@ +[defaults] +stdout_callback=yaml +stderr_callback=yaml +host_key_checking = false + +[privilege_escalation] +become_flags=-i \ No newline at end of file diff --git a/fr/pgbackrest_dans_tous_ses_etats/ansible/install.yml b/fr/pgbackrest_dans_tous_ses_etats/ansible/install.yml new file mode 100644 index 0000000..99a8e4e --- /dev/null +++ b/fr/pgbackrest_dans_tous_ses_etats/ansible/install.yml @@ -0,0 +1,31 @@ +# provisionning/all.yml +- name: "Install" + hosts: "postgres" + gather_facts: false + tasks: + - name: "Copy file with owner and permissions" + ansible.builtin.copy: + src: install_pg.sh + dest: /tmp/install.sh + owner: formateur + group: formateur + mode: "0777" + +- name: "Install" + hosts: "pgbackrest" + gather_facts: false + tasks: + - name: "Copy file with owner and permissions" + ansible.builtin.copy: + src: install_pgbackrest.sh + dest: /tmp/install.sh + owner: formateur + group: formateur + mode: "0777" + +- name: "Install" + hosts: "all" + gather_facts: false + tasks: + - name: "Execute install.sh" + ansible.builtin.shell: "/tmp/install.sh" \ No newline at end of file diff --git a/fr/pgbackrest_dans_tous_ses_etats/ansible/install_pg.sh b/fr/pgbackrest_dans_tous_ses_etats/ansible/install_pg.sh new file mode 120000 index 0000000..0c64fae --- /dev/null +++ b/fr/pgbackrest_dans_tous_ses_etats/ansible/install_pg.sh @@ -0,0 +1 @@ +../install_pg.sh \ No newline at end of file diff --git a/fr/pgbackrest_dans_tous_ses_etats/ansible/install_pgbackrest.sh b/fr/pgbackrest_dans_tous_ses_etats/ansible/install_pgbackrest.sh new file mode 120000 index 0000000..a8dbeba --- /dev/null +++ b/fr/pgbackrest_dans_tous_ses_etats/ansible/install_pgbackrest.sh @@ -0,0 +1 @@ +../install_pgbackrest.sh \ No newline at end of file diff --git a/fr/pgbackrest_dans_tous_ses_etats/ansible/inventory b/fr/pgbackrest_dans_tous_ses_etats/ansible/inventory new file mode 100644 index 0000000..606adfb --- /dev/null +++ b/fr/pgbackrest_dans_tous_ses_etats/ansible/inventory @@ -0,0 +1,19 @@ +[postgres] +172.16.8.15 ansible_port=2201 ansible_host=51.15.206.134 ansible_user=formateur +172.16.8.10 ansible_port=2202 ansible_host=51.15.206.134 ansible_user=formateur +172.16.8.4 ansible_port=2203 ansible_host=51.15.206.134 ansible_user=formateur +172.16.8.16 ansible_port=2204 ansible_host=51.15.206.134 ansible_user=formateur +172.16.8.17 ansible_port=2205 ansible_host=51.15.206.134 ansible_user=formateur +172.16.8.14 ansible_port=2206 ansible_host=51.15.206.134 ansible_user=formateur +172.16.8.13 ansible_port=2207 ansible_host=51.15.206.134 ansible_user=formateur +172.16.8.3 ansible_port=2208 ansible_host=51.15.206.134 ansible_user=formateur +172.16.8.6 ansible_port=2209 ansible_host=51.15.206.134 ansible_user=formateur +172.16.8.2 ansible_port=2210 ansible_host=51.15.206.134 ansible_user=formateur +172.16.8.18 ansible_port=2211 ansible_host=51.15.206.134 ansible_user=formateur +172.16.8.8 ansible_port=2212 ansible_host=51.15.206.134 ansible_user=formateur +172.16.8.9 ansible_port=2213 ansible_host=51.15.206.134 ansible_user=formateur +172.16.8.11 ansible_port=2214 ansible_host=51.15.206.134 ansible_user=formateur +172.16.8.7 ansible_port=2215 ansible_host=51.15.206.134 ansible_user=formateur + +[pgbackrest] +172.16.8.5 ansible_port=2216 ansible_host=51.15.206.134 ansible_user=formateur \ No newline at end of file diff --git a/fr/pgbackrest_dans_tous_ses_etats/workshop.md b/fr/pgbackrest_dans_tous_ses_etats/workshop.md index 139318a..866ab9b 100644 --- a/fr/pgbackrest_dans_tous_ses_etats/workshop.md +++ b/fr/pgbackrest_dans_tous_ses_etats/workshop.md @@ -1344,7 +1344,7 @@ backup-standby=y - Bertrand Painchaud - Florent Jardin - Laura Ricci -- Luc Amarle +- Luc Lamarle - Mathieu Ribes - Nicolas Gollet - Pauline Montpied