Debut Ansible
This commit is contained in:
parent
6a287b8ee7
commit
62052834f9
6
Sio2/SISR/40-ansible/hosts
Normal file
6
Sio2/SISR/40-ansible/hosts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[adm]
|
||||||
|
infra
|
||||||
|
|
||||||
|
[web]
|
||||||
|
web1
|
||||||
|
web2
|
1
Sio2/SISR/40-ansible/index.html
Normal file
1
Sio2/SISR/40-ansible/index.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
coucou les loulous
|
24
Sio2/SISR/40-ansible/rsyslog.yml
Normal file
24
Sio2/SISR/40-ansible/rsyslog.yml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
- hosts: infra
|
||||||
|
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: true
|
||||||
|
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: true
|
||||||
|
notify: Restart Rsyslog
|
||||||
|
|
||||||
|
handlers:
|
||||||
|
- name: Restart Rsyslog
|
||||||
|
service:
|
||||||
|
name: rsyslog
|
||||||
|
state: restarted
|
23
Sio2/SISR/40-ansible/web.yml
Normal file
23
Sio2/SISR/40-ansible/web.yml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
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/index.html
|
||||||
|
mode: 0664
|
Loading…
x
Reference in New Issue
Block a user