From d7115b7ffb096702650b67e39484d033ee57c1c7 Mon Sep 17 00:00:00 2001 From: Guillaume Emorine Date: Mon, 14 Oct 2024 16:46:42 +0200 Subject: [PATCH] =?UTF-8?q?=09Ajout=20d=C3=A9finitif=20des=20fichiers=20d'?= =?UTF-8?q?Ansible=20pour=20le=20DokuWiki.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bts_annee_2/sisr2/ansible/dokuw/README.md | 1 + bts_annee_2/sisr2/ansible/dokuw/main_doku.yml | 51 +++++++++++++++++++ .../ansible/dokuw/{main.yml => main_web.yml} | 0 3 files changed, 52 insertions(+) create mode 100644 bts_annee_2/sisr2/ansible/dokuw/README.md create mode 100644 bts_annee_2/sisr2/ansible/dokuw/main_doku.yml rename bts_annee_2/sisr2/ansible/dokuw/{main.yml => main_web.yml} (100%) diff --git a/bts_annee_2/sisr2/ansible/dokuw/README.md b/bts_annee_2/sisr2/ansible/dokuw/README.md new file mode 100644 index 0000000..7e12e04 --- /dev/null +++ b/bts_annee_2/sisr2/ansible/dokuw/README.md @@ -0,0 +1 @@ +Dossier des playbooks DokuWiki. \ No newline at end of file diff --git a/bts_annee_2/sisr2/ansible/dokuw/main_doku.yml b/bts_annee_2/sisr2/ansible/dokuw/main_doku.yml new file mode 100644 index 0000000..74f5b34 --- /dev/null +++ b/bts_annee_2/sisr2/ansible/dokuw/main_doku.yml @@ -0,0 +1,51 @@ +- name: 1. Récupération du tar.gz du DokuWiki + get_url: + url: http://depl/store/dokuwiki-stable.tgz + dest: /tmp + +- name: 2. Extraction de l'archive + unarchive: + src: /tmp/dokuwiki-stable.tgz + dest: /var/www/html + remote_src: yes + +- name: 3. Status des dossiers du Wiki + stat: + path: /var/www/html/dokuwiki-2024-02-06b + register: rept_stat + +- name: 4. On renomme les dossiers + command: mv /var/www/html/dokuwiki-2024-02-06b /var/www/html/doku + when: rept_stat.stat.exists + +- name: 5. Changement des droits sur la racine + file: + path: /var/www/html/doku + owner: root + group: root + +- name: 6. Changement des droits sur le dossier data + file: + path: /var/www/html/doku/data + owner: www-data + group: www-data + recurse: true + +- name: 7. Changement des droits sur le dossier conf + file: + path: /var/www/html/doku/conf + owner: www-data + group: www-data + recurse: true + +- name: 8. Changement des droits sur le dossier lib + file: + path: /var/www/html/doku/lib + owner: www-data + group: www-data + recurse: true + +- name: 9. Redémarre Apache2 + service: + name: apache2 + state: restarted diff --git a/bts_annee_2/sisr2/ansible/dokuw/main.yml b/bts_annee_2/sisr2/ansible/dokuw/main_web.yml similarity index 100% rename from bts_annee_2/sisr2/ansible/dokuw/main.yml rename to bts_annee_2/sisr2/ansible/dokuw/main_web.yml