Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
b14c35a7aa | |||
d8371a0973 | |||
4621000ce1 | |||
f030228008 | |||
d953531bf8 |
39
goss/s-agence.yaml
Normal file
39
goss/s-agence.yaml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
command:
|
||||||
|
ip r:
|
||||||
|
exit-status: 0
|
||||||
|
stdout:
|
||||||
|
- default via 172.16.128.254 dev enp0s8
|
||||||
|
- 172.16.128.0/24
|
||||||
|
- 192.168.99.0/24
|
||||||
|
stderr: []
|
||||||
|
timeout: 10000
|
||||||
|
ping -c 2 172.16.0.1:
|
||||||
|
exit-status: 0
|
||||||
|
stdout:
|
||||||
|
- 0% packet loss
|
||||||
|
stderr: []
|
||||||
|
timeout: 10000
|
||||||
|
ping -c 2 172.16.128.254:
|
||||||
|
exit-status: 0
|
||||||
|
stdout:
|
||||||
|
- 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.1.2:
|
||||||
|
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
|
@ -5,6 +5,7 @@
|
|||||||
- python3-mysqldb
|
- python3-mysqldb
|
||||||
- mariadb-server
|
- mariadb-server
|
||||||
- python3-passlib
|
- python3-passlib
|
||||||
|
- python3-pymysql
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: python3 par defaut
|
- name: python3 par defaut
|
||||||
@ -24,13 +25,19 @@
|
|||||||
mysql_user:
|
mysql_user:
|
||||||
name: "{{ maria_dbuser }}"
|
name: "{{ maria_dbuser }}"
|
||||||
password: "{{ maria_dbpasswd }}"
|
password: "{{ maria_dbpasswd }}"
|
||||||
priv: "*.*:ALL,GRANT"
|
priv: '*.*:ALL,GRANT'
|
||||||
login_unix_socket: /var/run/mysqld/mysqld.sock
|
login_unix_socket: /var/run/mysqld/mysqld.sock
|
||||||
with_items:
|
with_items:
|
||||||
- 127.0.0.1
|
- "127.0.0.1"
|
||||||
|
# - ::1
|
||||||
|
# - localhost
|
||||||
|
|
||||||
- name: Copie du fichier my.cnf pour autorises toutes les adresses sur le port 3306
|
- name: Copie du fichier my.cnf pour autorises toutes les adresses sur le port 3306
|
||||||
copy : src=my.cnf dest=/etc/mysql/
|
copy:
|
||||||
|
src: my.cnf
|
||||||
|
dest: /etc/mysql/
|
||||||
|
|
||||||
- name: Redemarrage du service mariadb
|
- name: Redemarrage du service mariadb
|
||||||
shell: service mariadb restart
|
service:
|
||||||
|
name: mariadb
|
||||||
|
state: restarted
|
||||||
|
@ -4,7 +4,7 @@ apt-get update && apt-get upgrade -y
|
|||||||
# Install MySQL Server in a Non-Interactive mode. Default root password will be "root"
|
# Install MySQL Server in a Non-Interactive mode. Default root password will be "root"
|
||||||
echo "mysql-server mysql-server/root_password password root" | debconf-set-selections
|
echo "mysql-server mysql-server/root_password password root" | debconf-set-selections
|
||||||
echo "mysql-server mysql-server/root_password_again password root" | debconf-set-selections
|
echo "mysql-server mysql-server/root_password_again password root" | debconf-set-selections
|
||||||
apt-get -y install mariadb-server
|
apt-get -y install mysql-server
|
||||||
|
|
||||||
|
|
||||||
# Run the MySQL Secure Installation wizard
|
# Run the MySQL Secure Installation wizard
|
||||||
|
@ -25,6 +25,14 @@
|
|||||||
- {'regexp': "define\\('DB_USER', '(.)+'\\);", 'line': "define('DB_USER', '{{wp_mysql_user}}');"}
|
- {'regexp': "define\\('DB_USER', '(.)+'\\);", 'line': "define('DB_USER', '{{wp_mysql_user}}');"}
|
||||||
- {'regexp': "define\\('DB_PASSWORD', '(.)+'\\);", 'line': "define('DB_PASSWORD', '{{wp_mysql_password}}');"}
|
- {'regexp': "define\\('DB_PASSWORD', '(.)+'\\);", 'line': "define('DB_PASSWORD', '{{wp_mysql_password}}');"}
|
||||||
|
|
||||||
|
|
||||||
|
- name: Attributions des permissions
|
||||||
|
file:
|
||||||
|
path: /home/wordpress
|
||||||
|
recurse: yes
|
||||||
|
owner: 33
|
||||||
|
group: 33
|
||||||
|
|
||||||
# - name: Fix permissions
|
# - name: Fix permissions
|
||||||
# shell: chown -R www-data /var/www/wordpress/*
|
# shell: chown -R www-data /var/www/wordpress/*
|
||||||
#
|
#
|
||||||
|
@ -20,3 +20,4 @@ conn tunnel #
|
|||||||
auto=start
|
auto=start
|
||||||
keyexchange=ikev2
|
keyexchange=ikev2
|
||||||
type=tunnel
|
type=tunnel
|
||||||
|
#
|
||||||
|
@ -20,3 +20,4 @@ conn tunnel #
|
|||||||
auto=start
|
auto=start
|
||||||
keyexchange=ikev2
|
keyexchange=ikev2
|
||||||
type=tunnel
|
type=tunnel
|
||||||
|
#
|
||||||
|
@ -7,3 +7,4 @@
|
|||||||
- ssh-cli
|
- ssh-cli
|
||||||
- syslog-cli
|
- syslog-cli
|
||||||
- post
|
- post
|
||||||
|
- goss
|
||||||
|
Reference in New Issue
Block a user