diff --git a/Sio2/SISR/40-ansible/hosts b/Sio2/SISR/40-ansible/hosts new file mode 100644 index 0000000..28c495b --- /dev/null +++ b/Sio2/SISR/40-ansible/hosts @@ -0,0 +1,6 @@ +[adm] +infra + +[web] +web1 +web2 diff --git a/Sio2/SISR/40-ansible/index.html b/Sio2/SISR/40-ansible/index.html new file mode 100644 index 0000000..6d59b50 --- /dev/null +++ b/Sio2/SISR/40-ansible/index.html @@ -0,0 +1 @@ +coucou les loulous diff --git a/Sio2/SISR/40-ansible/rsyslog.yml b/Sio2/SISR/40-ansible/rsyslog.yml new file mode 100644 index 0000000..9d4eab9 --- /dev/null +++ b/Sio2/SISR/40-ansible/rsyslog.yml @@ -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 diff --git a/Sio2/SISR/40-ansible/web.yml b/Sio2/SISR/40-ansible/web.yml new file mode 100644 index 0000000..7217470 --- /dev/null +++ b/Sio2/SISR/40-ansible/web.yml @@ -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