nouveau fichier : sio2/SISR/09-ansible/dokuwiki/dokuw/hosts

nouveau fichier : sio2/SISR/09-ansible/dokuwiki/dokuw/local.yml
	nouveau fichier : sio2/SISR/09-ansible/dokuwiki/dokuw/roles/doku/tasks/main.yml
	nouveau fichier : sio2/SISR/09-ansible/dokuwiki/dokuw/roles/web/tasks/main.yml
This commit is contained in:
root 2024-10-14 15:25:18 +02:00
parent 8736176b70
commit 42a7743053
4 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,6 @@
[adm]
infra
[web]
web1
web2

View File

@ -0,0 +1,5 @@
---
- hosts : web
roles:
- web
- doku

View File

@ -0,0 +1,53 @@
---
- name: recuperer dokuwiki-stables.tgz depuis le machine depl
get_url:
url: http://depl/store/dokuwiki-stable.tgz
dest: /tmp
- name: extraction archive
unarchive:
src: /tmp/dokuwiki-stable.tgz
dest: /var/www/html/
remote_src: yes
- name: renommer repertoire
stat:
path: /var/www/html/dokuwiki-2024-02-06b
register: doku
#- name: renommer doku en nouveau si existe
# command: mv /var/www/html/dokuwiki-2024-02-06b /var/www/html/doku
#when: doku.stat.exists
- name: donner les droits root au repertoire /var/www/html/doku
file:
path: /var/www/html/doku
state: directory
recurse: yes
owner: www-data
group: www-data
- name: donner les droits a www-data pour le repertoire /var/www/html/doku/data
file:
path: /var/www/html/doku/data
state: directory
recurse: yes
owner: www-data
group: www-data
- name: donner les droits a www-data pour le repertoire /var/www/html/doku/lib
file:
path: /var/www/html/doku/lib
state: directory
recurse: yes
owner: www-data
group: www-data
- name: donner les droits a www-data pour le repertoire /var/www/html/doku/conf
file:
path: /var/www/html/doku/conf
state: directory
recurse: yes
owner: www-data
group: www-data

View File

@ -0,0 +1,11 @@
---
- name: installation des paquets apache, php ...2
apt:
name:
- apache2
- php
- php-mbstring
- php-gd
- php-xml
state: present