Compare commits

...

16 Commits

12 changed files with 162 additions and 186 deletions

View File

@ -1,76 +1,56 @@
file:
/etc/wireguard/wg0.conf:
exists: true
mode: "0644"
owner: root
group: root
filetype: file
contains:
- AllowedIPs = 10.0.0.2/32, 172.16.128.0/24
package: package:
# ferm: wireguard:
# installed: true
wireguard:
installed: true installed: true
wireguard-tools: versions:
- 1.0.20210223-1
wireguard-tools:
installed: true installed: true
port: versions:
udp:68: - 1.0.20210223-1
listening: true
service: service:
# dnsmasq: wg-quick@wg0:
# enabled: true
# running: true
wireguard:
enabled: true
running: true
ssh:
enabled: true enabled: true
running: true running: true
command: command:
sysctl net.ipv4.ip_forward: host 192.168.99.99:
exit-status: 0 exit-status: 0
stdout: stdout:
- net.ipv4.ip_forward = 1 - 99.99.168.192.in-addr.arpa domain name pointer s-adm.gsb.adm.
stderr: [] stderr: []
timeout: 10000 timeout: 10000
command: ping -c4 10.0.0.2:
ping -c 4 192.168.0.52:
exit-status: 0 exit-status: 0
stdout: stdout:
- 4 received = 1 - 0% packet loss
stderr: [] stderr: []
timeout: 10000 timeout: 10000
command:
ping -c 4 192.168.1.1:
exit-status: 0
stdout:
- 4 received = 1
stderr: []
timeout: 10000
command:
ping -c 4 192.168.200.254:
exit-status: 0
stdout:
- 4 received = 1
stderr: []
timeout: 10000
command:
ping -c 4 172.16.0.1:
exit-status: 0
stdout:
- 4 received = 1
stderr: []
timeout: 10000
command:
ping -c 4 10.0.0.2:
exit-status: 0
stdout:
- 4 received = 1
stderr: []
timeout: 10000
#process:
# dnsmasq:
# running: true
# squid:
# running: true
interface: interface:
enp0s3:
exists: true
addrs:
- 192.168.99.112/24
mtu: 1500
enp0s8: enp0s8:
exists: true exists: true
addrs: addrs:
- 192.168.0.51/24 - 192.168.1.2/24
mtu: 1500
enp0s9: enp0s9:
exists: true exists: true
addrs: addrs:
- 192.168.1.2/24 - 192.168.0.51/24
mtu: 1500
wg0:
exists: true
addrs:
- 10.0.0.1/32
mtu: 1420

52
goss/r-vp2.yaml Normal file
View File

@ -0,0 +1,52 @@
file:
/etc/wireguard/wg0.conf:
exists: true
mode: "0644"
owner: root
group: root
filetype: file
contains: []
package:
wireguard:
installed: true
versions:
- 1.0.20210223-1
wireguard-tools:
installed: true
versions:
- 1.0.20210223-1
service:
isc-dhcp-server:
enabled: true
running: true
wg-quick@wg0:
enabled: true
running: true
command:
ping -c4 10.0.0.1:
exit-status: 0
stdout:
- 0% packet loss
stderr: []
timeout: 10000
interface:
enp0s3:
exists: true
addrs:
- 192.168.99.102/24
mtu: 1500
enp0s8:
exists: true
addrs:
- 172.16.128.254/24
mtu: 1500
enp0s9:
exists: true
addrs:
- 192.168.0.52/24
mtu: 1500
wg0:
exists: true
addrs:
- 10.0.0.2/32
mtu: 1420

View File

@ -1,67 +0,0 @@
package:
ferm:
installed: true
ipsec:
installed: true
port:
tcp:53:
listening: true
udp:67:
listening: true
udp:68:
listening: true
service:
dnsmasq:
enabled: true
running: true
ferm:
enabled: true
running: true
ssh:
enabled: true
running: true
command:
sysctl net.ipv4.ip_forward:
exit-status: 0
stdout:
- net.ipv4.ip_forward = 1
stderr: []
timeout: 10000
sysctl ping -c 4 192.168.0.51:
exit-status: 0
stdout:
- 4 received = 1
stderr: []
timeout: 10000
sysctl ping -c 4 192.168.1.1:
exit-status: 0
stdout:
- 4 received = 1
stderr: []
timeout: 10000
sysctl ping -c 4 192.168.200.254:
exit-status: 0
stdout:
- 4 received = 1
stderr: []
timeout: 10000
sysctl ping -c 4 172.16.0.1:
exit-status: 0
stdout:
- 4 received = 1
stderr: []
timeout: 10000
process:
dnsmasq:
running: true
squid3:
running: true
interface:
enp0s8:
exists: true
addrs:
- 172.16.128.254/24
enp0s9:
exists: true
addrs:
- 192.168.0.52/24

View File

@ -1,39 +1,19 @@
command: command:
ip r: ip route |grep default:
exit-status: 0 exit-status: 0
stdout: stdout:
- default via 172.16.128.254 dev enp0s8 - default via 172.16.128.254 dev enp0s8
- 172.16.128.0/24
- 192.168.99.0/24
stderr: [] stderr: []
timeout: 10000 timeout: 10000
ping -c 2 172.16.128.254: ping -c4 172.16.0.1:
exit-status: 0 exit-status: 0
stdout: stdout:
- 0% packet loss - 0% packet loss
stderr: [] stderr: []
timeout: 10000 timeout: 10000
ping -c 2 192.168.1.2: ping -c4 172.16.128.254:
exit-status: 0 exit-status: 0
stdout: stdout:
- 0% packet loss - 0% packet loss
stderr: []
timeout: 10000
ping -c 2 192.168.1.1:
exit-status: 0
stdout:
- 0% packet loss
stderr: []
timeout: 10000
ping -c 2 192.168.200.254:
exit-status: 0
stdout:
- 0% packet loss
stderr: []
timeout: 10000
ping -c 2 172.16.0.1:
exit-status: 0
stdout:
- 0% packet loss
stderr: [] stderr: []
timeout: 10000 timeout: 10000

41
goss/s-backup.yaml Normal file
View File

@ -0,0 +1,41 @@
package:
bind9:
installed: true
cifs-utils:
installed: true
rsync:
installed: true
smbclient:
installed: true
service:
bind9:
enabled: true
running: true
rsync:
enabled: true
running: false
command:
ping -c4 ns.gsb.lan:
exit-status: 0
stdout:
- 0% packet loss
stderr: []
timeout: 10000
#check si partage windows accesible
smbclient -L //s-win --user=uBackup%Azerty1+ | grep 'public':
exit-status: 0
stdout:
- public
stderr: []
timeout: 10000
interface:
enp0s3:
exists: true
addrs:
- 192.168.99.4/24
mtu: 1500
enp0s8:
exists: true
addrs:
- 172.16.0.4/24
mtu: 1500

View File

@ -49,7 +49,7 @@ interface:
enp0s3: enp0s3:
exists: true exists: true
addrs: addrs:
- 192.168.99.104/24 - 192.168.99.8/24
enp0s8: enp0s8:
exists: true exists: true
addrs: addrs:

View File

@ -44,7 +44,6 @@ backend fermeweb
#option httpchk HEAD / HTTP/1.0 #option httpchk HEAD / HTTP/1.0
server s-lb-web1 192.168.101.1:80 check server s-lb-web1 192.168.101.1:80 check
server s-lb-web2 192.168.101.2:80 check server s-lb-web2 192.168.101.2:80 check
#server s-lb-web3 192.168.101.3:80 check
listen stats listen stats

View File

@ -8,18 +8,18 @@
path: /etc/haproxy/haproxy.cfg path: /etc/haproxy/haproxy.cfg
block: | block: |
frontend proxypublic frontend proxypublic
bind 192.168.56.2:80 bind 192.168.100.10:80
default_backend fermeweb default_backend fermeweb
backend fermeweb backend fermeweb
balance roundrobin balance roundrobin
option httpclose option httpclose
#option httpchk HEAD / HTTP/1.0 #option httpchk HEAD / HTTP/1.0
server web1.test 192.168.56.3:80 check server s-lb-web1 192.168.101.1:80 check
#server web2.test 192.168.56.4:80 check server s-lb-web2 192.168.101.2:80 check
- name: redemarre haproxy - name: redemarre haproxy
service: service:
name: haproxy name: haproxy
state: restarted # state: restarted
enabled: yes enabled: yes

View File

@ -1,38 +1,29 @@
--- ---
- name: creation repertoir - name: installation php et apache ...
file: apt:
path: /home/ name:
state: directory - apache2
- name: download and extract wordpress - php
unarchive: - php-mbstring
src: "{{ depl_url }}/{{ depl_wordpress }}" - php-mysql
- mariadb-client
state: present
- name: download and extract wordpress
unarchive:
src: https://fr.wordpress.org/latest-fr_FR.tar.gz
dest: /home/ dest: /home/
remote_src: yes remote_src: yes
owner: www-data
group: www-data
- name: Copy sample config file - name: Copy sample config file
command: mv /home/wordpress/wp-config-sample.php /home/wordpress/wp-config.php creates=/home/wordpress/wp-config.php command: mv /home/wordpress/wp-config-sample.php /home/wordpress/wp-config.php creates=/home/wordpress/wp-config.php
- name: Changement du fichier de conf - name: Changement du fichier de conf
copy: copy:
src: wp-config.php src: wp-config.php
dest: /home/wordpress/wp-config.php dest: /home/wordpress/wp-config.php
- name: Attributions des permissions - name: Attributions des permissions
file: file:
path: /home/wordpress path: /home/wordpress
recurse: yes recurse: yes
owner: 33
group: 33
# - name: Fix permissions
# shell: chown -R www-data /var/www/wordpress/*
#
# - name: Update default Apache site
# lineinfile:
# dest=/etc/apache2/sites-enabled/000-default.conf
# regexp="(.)+DocumentRoot /var/www/html"
# line="DocumentRoot /var/www/wordpress"
# notify:
# - restart apache2

View File

@ -4,6 +4,7 @@
roles: roles:
- base - base
- goss
# - proxy3 # - proxy3
- snmp-agent - snmp-agent
# - ssh-cli # - ssh-cli

View File

@ -8,4 +8,3 @@
- snmp-agent - snmp-agent
- lb-nfs-client - lb-nfs-client
- post - post

View File

@ -5,7 +5,7 @@
roles: roles:
- base - base
- goss - goss
- s-lb-ab - lb-front
- snmp-agent - snmp-agent
- post - post