Compare commits
2 Commits
onfarbo-2
...
onfarbo-4-
Author | SHA1 | Date | |
---|---|---|---|
|
254b9810be | ||
|
47b4a07b23 |
File diff suppressed because one or more lines are too long
4
AP4/onfarbo41/ansible/hosts
Normal file
4
AP4/onfarbo41/ansible/hosts
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
[localhost]
|
||||||
|
|
||||||
|
[onfarbo]
|
||||||
|
onfarbo41
|
@@ -1,6 +1,5 @@
|
|||||||
- name: Playbook pour onfarbo
|
- name: Playbook pour onfarbo
|
||||||
hosts: onfabro
|
hosts: onfarbo
|
||||||
connection: local
|
|
||||||
become: yes
|
become: yes
|
||||||
become_method: sudo
|
become_method: sudo
|
||||||
become_user: root
|
become_user: root
|
20
AP4/onfarbo41/ansible/roles/onfarbo/files/dokuwiki.sh
Executable file
20
AP4/onfarbo41/ansible/roles/onfarbo/files/dokuwiki.sh
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
chemin=/var/www/html/doku
|
||||||
|
|
||||||
|
apt install -y apache2 php php-mbstring php-gd php-xml
|
||||||
|
cd /root
|
||||||
|
[ -r dokuwiki-stable.tgz ] || wget http://depl/store/dokuwiki-stable.tgz
|
||||||
|
|
||||||
|
if [ $? !=0 ]; then
|
||||||
|
echo "$0 : erreurwget" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
tar xvfz dokuwiki-stable.tgz
|
||||||
|
[ -d "${chemin}" ] || mkdir "${chemin}"
|
||||||
|
|
||||||
|
cp -a dokuwiki-2020-07-29/* "${chemin}"
|
||||||
|
cd "${chemin}"
|
||||||
|
chown -R root:root .
|
||||||
|
chmod -R 755 .
|
||||||
|
chown -R www-data:www-data data lib conf
|
||||||
|
exit 0
|
@@ -54,3 +54,30 @@
|
|||||||
priv: '*.*:ALL,GRANT'
|
priv: '*.*:ALL,GRANT'
|
||||||
state: present
|
state: present
|
||||||
login_unix_socket: /var/run/mysqld/mysqld.sock
|
login_unix_socket: /var/run/mysqld/mysqld.sock
|
||||||
|
|
||||||
|
- name: Création du dossier DokuWiki
|
||||||
|
tags: createfile
|
||||||
|
file:
|
||||||
|
path: /root/dokuwiki
|
||||||
|
state: directory
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
|
- name: copie du fichier script d'install de dokuwiki
|
||||||
|
tags: sh
|
||||||
|
copy:
|
||||||
|
src: dokuwiki.sh
|
||||||
|
dest: /root/dokuwiki
|
||||||
|
|
||||||
|
- name: On rend exécutable le script d'install
|
||||||
|
tags: chmod
|
||||||
|
file:
|
||||||
|
path: /root/dokuwiki/dokuwiki.sh
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
|
- name: exécution du script d'install de dokuwiki
|
||||||
|
tags: exec
|
||||||
|
command: bash /root/dokuwiki/dokuwiki.sh
|
||||||
|
|
||||||
|
- name: Message d'information pour dokuwiki
|
||||||
|
tags: msg2
|
||||||
|
debug: msg="Le dokuwiki devra être installer depuis l'adresse http://10.121.38.206/doku/install.php"
|
36
AP4/onfarbo41/gosstest/goss.yaml
Normal file
36
AP4/onfarbo41/gosstest/goss.yaml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
#Ici, on test MariaDB
|
||||||
|
port:
|
||||||
|
tcp:3306:
|
||||||
|
listening: true
|
||||||
|
ip:
|
||||||
|
- 127.0.0.1
|
||||||
|
|
||||||
|
#Ici, on test ssh
|
||||||
|
service:
|
||||||
|
ssh:
|
||||||
|
enabled: true
|
||||||
|
running: true
|
||||||
|
group:
|
||||||
|
ssh:
|
||||||
|
exists: true
|
||||||
|
gid: 111
|
||||||
|
|
||||||
|
#Ici, on test le serveur web
|
||||||
|
http:
|
||||||
|
http://10.121.38.206:
|
||||||
|
status: 200
|
||||||
|
allow-insecure: false
|
||||||
|
no-follow-redirects: false
|
||||||
|
timeout: 5000
|
||||||
|
body:
|
||||||
|
- works
|
||||||
|
|
||||||
|
#Ici, on test dokuwiki
|
||||||
|
http:
|
||||||
|
http://10.121.38.206/doku/:
|
||||||
|
status: 200
|
||||||
|
allow-insecure: false
|
||||||
|
no-follow-redirects: false
|
||||||
|
timeout: 5000
|
||||||
|
body:
|
||||||
|
- Trace
|
@@ -1,4 +0,0 @@
|
|||||||
[localhost]
|
|
||||||
|
|
||||||
[onfabro]
|
|
||||||
onfabrovr
|
|
@@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
# defaults file for onfarbo
|
|
Reference in New Issue
Block a user