Ajout définitif des fichiers d'Ansible pour le DokuWiki.

This commit is contained in:
Guillaume Emorine 2024-10-14 16:46:42 +02:00
parent 66c8cdf08e
commit d7115b7ffb
3 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1 @@
Dossier des playbooks DokuWiki.

View File

@ -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