Compare commits

..

16 Commits

25 changed files with 44 additions and 41 deletions

View File

@ -1,6 +1,6 @@
# gsb2023 # gsb2023
2023-01-25 ps 2023-01-30 ps
Environnement et playbooks ansible pour le projet GSB 2023 Environnement et playbooks ansible pour le projet GSB 2023
@ -34,7 +34,7 @@ Prérequis :
* **s-lb-web1** : Serveur Wordpress 1 Load Balancer * **s-lb-web1** : Serveur Wordpress 1 Load Balancer
* **s-lb-web2** : Serveur Wordpress 2 Load Balancer * **s-lb-web2** : Serveur Wordpress 2 Load Balancer
* **s-lb-db** : Serveur Mariadb pour Wordpress * **s-lb-db** : Serveur Mariadb pour Wordpress
* **s-lb-nfs** : Serveur NFS pour application Wordpress * **s-nas** : Serveur NFS pour application Wordpress avec LB
## Les playbooks ## Les playbooks

View File

@ -13,9 +13,9 @@
- goss - goss
# - snmp-agent # - snmp-agent
# - firewall-vpn-r # - firewall-vpn-r
- post
- wireguard-r - wireguard-r
# - x509-r
- fw-ferm - fw-ferm
- ssh-cli - ssh-cli
- syslog-cli - syslog-cli
- post

View File

@ -10,5 +10,3 @@
copy: src=dhcpd.conf dest=/etc/dhcp/ copy: src=dhcpd.conf dest=/etc/dhcp/
notify: notify:
- restart isc-dhcp-server - restart isc-dhcp-server

View File

@ -1,17 +1,15 @@
--- ---
- name: creation d'un repertoire fog
file:
path: /root/tools/fog
state: directory
- name: recuperation de l'archive d'installation fog sur git - name: recuperation de l'archive d'installation fog sur git
git: git:
repo: https://gitea.lyc-lecastel.fr/gadmin/fog.git repo: https://gitea.lyc-lecastel.fr/gadmin/fog.git
dest: /root/tools/fog/ dest: /root/tools/fog/
clone: yes clone: yes
update: yes update: yes
force: yes
#- name: Instructions - name: Modification fichier bash (desac UDPCast)
# tags: msg ansible.builtin.lineinfile:
# debug: msg='{{instructions}}' path: /root/tools/fog/lib/common/functions.sh
regexp: '^configureUDPCast\(\).*'
line: "configureUDPCast() {\nreturn"
backup: yes

View File

@ -10,4 +10,4 @@
dest: /etc/fstab dest: /etc/fstab
regexp: '' regexp: ''
insertafter: EOF insertafter: EOF
line: '192.168.102.253:/home/wordpress /var/www/html/wordpress nfs soft,timeo=5,intr,rsize=8192,wsize=8192,wsize=8192 0 0' line: '192.168.102.253:/home/ /var/www/html/wordpress nfs soft,timeo=5,intr,rsize=8192,wsize=8192,wsize=8192 0 0'

View File

@ -60,7 +60,7 @@
replace: replace:
path: /home/wordpress/wp-config.php path: /home/wordpress/wp-config.php
regexp: "localhost" regexp: "localhost"
replace: "192.168.102.253" replace: "192.168.102.254"
backup: yes backup: yes
- name: 55 - relance nfs - name: 55 - relance nfs

View File

@ -1,5 +1,7 @@
--- ---
- name: - name: installation des paquets web
apt:
name:
- apache2 - apache2
- php - php
- php-mbstring - php-mbstring
@ -16,11 +18,11 @@
blockinfile: blockinfile:
path: /etc/fstab path: /etc/fstab
block: | block: |
192.168.56.6:/exports/wordpress /var/www/html nfs soft,timeo=5,intr,rsize=8192,wsize=8192,wsize=8192 0 0 192.168.102.253:/home/wordpress /var/www/html nfs soft,timeo=5,intr,rsize=8192,wsize=8192,wsize=8192 0 0
- name: monte export wordpress #- name: monte export wordpress
ansible.posix.mount: # ansible.posix.mount:
path: /var/www/html # path: /var/www/html
state: mounted # state: mounted
fstype: nfs # fstype: nfs
src: 192.168.56.6:/exports/wordpress # src: 192.168.102.253:/exports/wordpress

View File

@ -14,8 +14,7 @@
name: wireguard-tools name: wireguard-tools
state: present state: present
#- name: copie du fichier de configuration depuis r-vp1
# command: "sshpass -p 'root' scp -r root@192.168.99.112:/root/confwg/wg0-b.conf /etc/wireguard/"
#- name: renommage du fichier de configuration #- name: renommage du fichier de configuration
# command: "mv /etc/wireguard/wg0-b.conf /etc/wireguard/wg0.conf" # command: "mv /etc/wireguard/wg0-b.conf /etc/wireguard/wg0.conf"

View File

@ -39,3 +39,4 @@
name: wg-quick@wg0 name: wg-quick@wg0
enabled: yes enabled: yes
state: restarted state: restarted

View File

@ -4,6 +4,6 @@
roles: roles:
- base - base
- post
- lb-web - lb-web
- snmp-agent - snmp-agent
- post

View File

@ -4,6 +4,6 @@
roles: roles:
- base - base
- post
- lb-web - lb-web
- snmp-agent - snmp-agent
- post

2
scripts/r-vp1-post.sh Normal file
View File

@ -0,0 +1,2 @@
#!/bin/bash
cd /root/confwg/ && python3 -m http.server 8000 &

3
scripts/r-vp2-post.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
wget http://r-vp1.gsb.adm:8000/wg0-b.qconf