Compare commits
3 Commits
v0.0.3s-ml
...
v0.0.3u-em
Author | SHA1 | Date | |
---|---|---|---|
05ddace1af | |||
9019c0dbe7 | |||
9fd18796a6 |
@ -2,13 +2,16 @@
|
|||||||
|
|
||||||
Modifier l'execution d'iptables [plus d'info ici]:https://wiki.debian.org/iptables
|
Modifier l'execution d'iptables [plus d'info ici]:https://wiki.debian.org/iptables
|
||||||
```bash
|
```bash
|
||||||
update-alternatives --set iptables /usr/sbin/iptables-legacy```
|
update-alternatives --set iptables /usr/sbin/iptables-legacy
|
||||||
|
```
|
||||||
|
|
||||||
Pour tester utiliser [Nmap]:https://nmap.org/man/fr/man-briefoptions.html
|
Pour tester utiliser [Nmap]:https://nmap.org/man/fr/man-briefoptions.html
|
||||||
```bash
|
```bash
|
||||||
sudo nmap -p51820 192.168.0.51```(r-vp1)
|
sudo nmap -p51820 192.168.0.51
|
||||||
|
```(r-vp1)
|
||||||
```bash
|
```bash
|
||||||
sudo nmap -p51820 192.168.0.52```(r-vp2)
|
sudo nmap -p51820 192.168.0.52
|
||||||
|
```(r-vp2)
|
||||||
|
|
||||||
Sortie :
|
Sortie :
|
||||||
`PORT STATE SERVICE
|
`PORT STATE SERVICE
|
||||||
|
@ -2,13 +2,16 @@
|
|||||||
|
|
||||||
Modifier l'execution d'iptables [plus d'info ici]:https://wiki.debian.org/iptables
|
Modifier l'execution d'iptables [plus d'info ici]:https://wiki.debian.org/iptables
|
||||||
```bash
|
```bash
|
||||||
update-alternatives --set iptables /usr/sbin/iptables-legacy```
|
update-alternatives --set iptables /usr/sbin/iptables-legacy
|
||||||
|
```
|
||||||
|
|
||||||
Pour tester utiliser [Nmap]:https://nmap.org/man/fr/man-briefoptions.html
|
Pour tester utiliser [Nmap]:https://nmap.org/man/fr/man-briefoptions.html
|
||||||
```bash
|
```bash
|
||||||
sudo nmap -p51820 192.168.0.51```(r-vp1)
|
sudo nmap -p51820 192.168.0.51
|
||||||
|
```(r-vp1)
|
||||||
```bash
|
```bash
|
||||||
sudo nmap -p51820 192.168.0.52```(r-vp2)
|
sudo nmap -p51820 192.168.0.52
|
||||||
|
```(r-vp2)
|
||||||
|
|
||||||
Sortie :
|
Sortie :
|
||||||
`PORT STATE SERVICE
|
`PORT STATE SERVICE
|
||||||
|
67
s-lb-bd.yml
67
s-lb-bd.yml
@ -1,24 +1,49 @@
|
|||||||
---
|
---
|
||||||
- hosts: localhost
|
- hosts: all
|
||||||
connection: local
|
become: true
|
||||||
vars:
|
tasks:
|
||||||
maria_dbhost: "192.168.102.254"
|
|
||||||
maria_dbname: "wordpress"
|
|
||||||
maria_dbuser: "wp"
|
|
||||||
maria_dbpasswd: "wp"
|
|
||||||
|
|
||||||
|
- name: modules python pour
|
||||||
|
apt:
|
||||||
|
name: python3-pymysql
|
||||||
|
state: present
|
||||||
|
|
||||||
roles:
|
- name: install mariadb-server
|
||||||
- base
|
apt:
|
||||||
- goss
|
name: mariadb-server
|
||||||
- post
|
state: present
|
||||||
#- s-lb-bd-ab
|
|
||||||
- mariadb-ab
|
- name: Cree Bd wordpress
|
||||||
# - role: db-user
|
mysql_db:
|
||||||
# cli_ip: "192.168.102.1"
|
db: wordpressdb
|
||||||
# - role: db-user
|
login_unix_socket: /var/run/mysqld/mysqld.sock
|
||||||
# cli_ip: "192.168.102.2"
|
state: present
|
||||||
# - role: db-user
|
|
||||||
# cli_ip: "192.168.102.3"
|
- name: Ouvre port 3306 mariadb-server
|
||||||
- snmp-agent
|
replace:
|
||||||
# - post
|
path: /etc/mysql/mariadb.conf.d/50-server.cnf
|
||||||
|
regexp: '^bind-address.*'
|
||||||
|
replace: '#bind-adress = 127.0.0.1'
|
||||||
|
backup: yes
|
||||||
|
notify: restart mariadb
|
||||||
|
|
||||||
|
- name: Create MySQL user for wordpress
|
||||||
|
mysql_user:
|
||||||
|
name: wordpressuser
|
||||||
|
password: wordpresspasswd
|
||||||
|
priv: "wordpressdb.*:ALL"
|
||||||
|
host: '%'
|
||||||
|
state: present
|
||||||
|
login_unix_socket: /var/run/mysqld/mysqld.sock
|
||||||
|
|
||||||
|
handlers:
|
||||||
|
- name: restart mariadb
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: mariadb
|
||||||
|
state: restarted
|
||||||
|
|
||||||
|
roles:
|
||||||
|
- base
|
||||||
|
- goss
|
||||||
|
- post
|
||||||
|
- snmp-agent
|
||||||
|
Reference in New Issue
Block a user