This commit is contained in:
Quentin.Bribant 2020-11-10 15:24:33 +01:00
parent e9c92508ed
commit 2a20abf821
14 changed files with 8722 additions and 0 deletions

View File

@ -0,0 +1,4 @@
- hosts: all
roles:
- web
- doku

View File

@ -0,0 +1,23 @@
#playbook
---
- name: paquets nécessaires
apt:
- name: recuperation dokuwiki-stable.tgz depuis machine depl
get_url:
url: http://depl/store/dokuwiki-stable.tgz
dest: /tmp
- name: Extraction archive
unarchive:
- name: stat rept
stat:
path: /mon/rept
register: rept_stat
- name: On renomme rept en nouveau
command: mv /mon/rept /mon/nouveau
when: rept_stat.stat.exists

View File

@ -0,0 +1,12 @@
#
---
- name: recuperation dokuwiki-stable.tgz depuis machine depl
get_url:
url: http://depl/store/dokuwiki-stable.tgz
dest: /tmpmem => variable squid ''cache_mem''
*
- name: Extraction archive
unarchive:

View File

@ -0,0 +1,13 @@
#
---
- hosts:
- name: installation apache2
apt:
name: apache2
state: present
- name:installation PHP
apt:
name: PHP
state: present

View File

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

View File

@ -0,0 +1 @@
salut

@ -0,0 +1 @@
Subproject commit 2a85c96c19b591022820a6d10a0342157c0ab9d7

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
infra

View File

@ -0,0 +1,26 @@
#
---
- hosts: adm
vars:
- proxy_port: 8080
- proxy_mem: 128
- proxy_localnet: 192.168.0.0/24
tasks:
- name: 1. installe squid
apt:
name: squid
state: present
- name: 2. Copie squid.conf
template:
src: squid.conf.j2
dest: /etc/squid/squid.conf
notify: Restart squid
handlers:
- name: Restart squid
service:
name: squid
state: restarted

View File

@ -0,0 +1,18 @@
#playbook.yml
---
- hosts: adm
tasks:
- name: Ajoute l'indication de serveur syslog distant si elle n'est pas presente
lineinfile:
path: /etc/rsyslog.conf
line: '*.* @192.168.0.32:514'
create: yes
backup: yes
notify: Restart rsyslog
handlers:
- name: Restart rsyslog
service:
name: rsyslog
state: restarted

View File

@ -0,0 +1,26 @@
#playbook.yml
---
- hosts: adm
tasks:
- name: decommente le chargement du module imudp dans rsyslog.conf
replace:
path: /etc/rsyslog.conf
regexp: '^#module\(load="imudp"\)'
replace: 'module(load="imudp")'
backup: yes
notify: Restart rsyslog
- name: decommente le chargement du module imudp dans rsyslog.conf
replace:
path: /etc/rsyslog.conf
regexp: '^#input\(type="imudp" port="514"\)'
replace: 'input(type="imudp" port="514")'
backup: yes
notify: Restart rsyslog
handlers:
- name: Restart rsyslog
service:
name: rsyslog
state: restarted

View File

@ -0,0 +1,2 @@
web1
web2

View File

@ -0,0 +1,24 @@
# playbook.yml
---
- hosts: web
tasks:
- name: 1. installe Apache
apt:
name: apache2
state: present
- name: 2. installe PHP pour Apache
apt:
name: php
state: present
- name: 3. installe PHP-mbstring
apt:
name: php-mbstring
state: present
- name: 4. installe index.html
copy:
src: index.html
dest: /var/www/html