Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
7c6851eabc | |||
6dd2d19fc8 | |||
e8c0745257 | |||
1204c5e8a4 | |||
7776d94f6c | |||
733e45410e | |||
36c0d92c9f | |||
4d5921858d | |||
34935c235e |
Binary file not shown.
@ -27,7 +27,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- nextcloud:/var/www/html
|
- nextcloud:/var/www/html
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_PASSWORD=nextcloud
|
- MYSQL_PASSWORD=root
|
||||||
- MYSQL_DATABASE=nextcloud
|
- MYSQL_DATABASE=nextcloud
|
||||||
- MYSQL_USER=nextcloud
|
- MYSQL_USER=nextcloud
|
||||||
- MYSQL_HOST=db
|
- MYSQL_HOST=db
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
- name: Creation du repertoire nextcloud
|
- name: Creation du repertoire nextcloud
|
||||||
file:
|
file:
|
||||||
path: /root/nextcloud
|
path: /root/nextcloud
|
||||||
|
state: directory
|
||||||
|
|
||||||
- name: Copie du script get_docker
|
- name: Copie du script get_docker
|
||||||
copy:
|
copy:
|
||||||
@ -11,12 +12,20 @@
|
|||||||
- name: Execution du script get_docker
|
- name: Execution du script get_docker
|
||||||
script: /root/nextcloud/get_docker.sh
|
script: /root/nextcloud/get_docker.sh
|
||||||
|
|
||||||
- name: Copie de docker-compose
|
- name: Installation de docker-compose
|
||||||
copy:
|
shell: curl -L "https://github.com/docker/compose/releases/download/1.28.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
||||||
src: docker-compose.yml
|
|
||||||
dest: /usr/local/bin
|
|
||||||
|
|
||||||
- name: Execution de la commande docker-compose up -d
|
- name: Attribution des droits de docker compose
|
||||||
shell:
|
file:
|
||||||
cmd: docker-compose up -d
|
path: /usr/local/bin/docker-compose
|
||||||
|
mode: '755'
|
||||||
|
|
||||||
|
- name: Copie de docker-compose.yml
|
||||||
|
copy:
|
||||||
|
src: /root/tools/ansible/gsb2021/roles/docker-nextcloud/files/docker-compose.yml
|
||||||
|
dest: /root/nextcloud
|
||||||
|
|
||||||
|
- name: Execution du fichier docker-compose.yml
|
||||||
|
shell: docker-compose up -d
|
||||||
|
args:
|
||||||
chdir: /root/nextcloud
|
chdir: /root/nextcloud
|
||||||
|
@ -2,12 +2,32 @@
|
|||||||
- name: Installation des paquets python-mysqldb mariadb-server
|
- name: Installation des paquets python-mysqldb mariadb-server
|
||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
- python-mysqldb
|
- python3-mysqldb
|
||||||
- mariadb-server
|
- mariadb-server
|
||||||
|
- python3-passlib
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
- name: python3 par defaut
|
||||||
|
alternatives:
|
||||||
|
link: /usr/bin/python
|
||||||
|
name: python
|
||||||
|
path: /usr/bin/python3
|
||||||
|
priority: 10
|
||||||
|
|
||||||
- name: Create mysql database
|
- name: Create mysql database
|
||||||
mysql_db: name={{ maria_dbname }} state=present
|
mysql_db:
|
||||||
|
name: "{{ maria_dbname }}"
|
||||||
|
state: present
|
||||||
|
login_unix_socket: /var/run/mysqld/mysqld.sock
|
||||||
|
|
||||||
|
- name: Creation de l'utilisateur mysql avec tous les privileges
|
||||||
|
mysql_user:
|
||||||
|
name: "{{ maria_dbuser }}"
|
||||||
|
password: "{{ maria_dbpasswd }}"
|
||||||
|
priv: "*.*:ALL,GRANT"
|
||||||
|
login_unix_socket: /var/run/mysqld/mysqld.sock
|
||||||
|
with_items:
|
||||||
|
- 127.0.0.1
|
||||||
|
|
||||||
- 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/
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# This file describes the network interfaces available on your system
|
# This file describes the network interfaces available on your system
|
||||||
# and how to activate them. For more information, see interfaces(5).
|
# and how to activate them. For more information, see interfaces(5).
|
||||||
|
|
||||||
# The loopback network interface
|
# The loopback network interface
|
||||||
#auto lo
|
#auto lo
|
||||||
#iface lo inet loopback
|
#iface lo inet loopback
|
||||||
@ -22,8 +21,11 @@ allow-hotplug enp0s9
|
|||||||
iface enp0s9 inet static
|
iface enp0s9 inet static
|
||||||
address 192.168.1.2
|
address 192.168.1.2
|
||||||
netmask 255.255.255.0
|
netmask 255.255.255.0
|
||||||
up route add -net 172.16.128.0/24 gw 192.168.1.2
|
post-up ip route add 172.16.128.0/24 via 192.168.1.2
|
||||||
|
post-up ip route add 172.16.0.0/24 via 192.168.1.1
|
||||||
|
post-up ip route add 192.168.200.0/24 via 192.168.1.1
|
||||||
|
|
||||||
# up route add -net 172.16.128.0/24 gw 192.168.0.52
|
# up route add -net 172.16.128.0/24 gw 192.168.0.52
|
||||||
# up route add default gw 192.168.1.1
|
# up route add default gw 192.168.1.1
|
||||||
# post-up /bin/bash /root/iptables-vpn
|
# post-up /bin/bash /root/iptables-vpn
|
||||||
post-up /etc/init.d/ipsec restart
|
post-up /etc/init.d/ipsec restart
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# This file describes the network interfaces available on your system
|
# This file describes the network interfaces available on your system
|
||||||
# and how to activate them. For more information, see interfaces(5).
|
# and how to activate them. For more information, see interfaces(5).
|
||||||
|
|
||||||
# The loopback network interface
|
# The loopback network interface
|
||||||
#auto lo
|
#auto lo
|
||||||
#iface lo inet loopback
|
#iface lo inet loopback
|
||||||
@ -22,7 +21,9 @@ allow-hotplug enp0s9
|
|||||||
iface enp0s9 inet static
|
iface enp0s9 inet static
|
||||||
address 192.168.0.52
|
address 192.168.0.52
|
||||||
netmask 255.255.255.0
|
netmask 255.255.255.0
|
||||||
# up route add -net 192.168.1.0/24 gw 172.16.128.254
|
post-up ip route add 192.168.1.0/24 via 172.16.128.254/24
|
||||||
up route add -net 192.168.1.0/24 gw 192.168.0.52
|
post-up ip route add 172.16.0.0/24 via 172.16.128.254/24
|
||||||
|
|
||||||
|
# up route add -net 192.168.1.0/24 gw 192.168.0.52
|
||||||
# post-up /bin/bash /root/iptables-vpn
|
# post-up /bin/bash /root/iptables-vpn
|
||||||
post-up /etc/init.d/ipsec restart
|
post-up /etc/init.d/ipsec restart
|
||||||
|
@ -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 mysql-server
|
apt-get -y install mariadb-server
|
||||||
|
|
||||||
|
|
||||||
# Run the MySQL Secure Installation wizard
|
# Run the MySQL Secure Installation wizard
|
||||||
@ -13,4 +13,4 @@ mysql_secure_installation
|
|||||||
sed -i 's/127\.0\.0\.1/0\.0\.0\.0/g' /etc/mysql/my.cnf
|
sed -i 's/127\.0\.0\.1/0\.0\.0\.0/g' /etc/mysql/my.cnf
|
||||||
mysql -uroot -p -e 'USE mysql; UPDATE `user` SET `Host`="%" WHERE `User`="root" AND `Host`="localhost"; DELETE FROM `user` WHERE `Host` != "%" AND `User`="root"; FLUSH PRIVILEGES;'
|
mysql -uroot -p -e 'USE mysql; UPDATE `user` SET `Host`="%" WHERE `User`="root" AND `Host`="localhost"; DELETE FROM `user` WHERE `Host` != "%" AND `User`="root"; FLUSH PRIVILEGES;'
|
||||||
|
|
||||||
service mysql restart
|
service mysql restart
|
||||||
|
2
roles/s-lb-wordpress/defaults/main.yml
Normal file
2
roles/s-lb-wordpress/defaults/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
depl_url: "http://s-adm.gsb.adm/gsbstore/"
|
||||||
|
depl_wordpress: "wordpress-5.6-fr_FR.tar.gz"
|
@ -5,9 +5,11 @@
|
|||||||
state: directory
|
state: directory
|
||||||
- name: download and extract wordpress
|
- name: download and extract wordpress
|
||||||
unarchive:
|
unarchive:
|
||||||
src: http://depl/gsbstore/wordpress-5.6-fr_FR.tar.gz
|
src: "{{ depl_url }}/{{ depl_wordpress }}"
|
||||||
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
|
||||||
|
@ -7,7 +7,7 @@ conn tunnel #
|
|||||||
left=192.168.0.52
|
left=192.168.0.52
|
||||||
leftsubnet=172.16.128.0/24
|
leftsubnet=172.16.128.0/24
|
||||||
right=192.168.0.51
|
right=192.168.0.51
|
||||||
rightsubnet=192.168.0.0/16, 172.16.0.0/24
|
rightsubnet=192.168.1.0/24, 192.168.200.0/24, 172.16.0.0/24
|
||||||
ike=aes256-sha2_256-modp1024!
|
ike=aes256-sha2_256-modp1024!
|
||||||
esp=aes256-sha2_256!
|
esp=aes256-sha2_256!
|
||||||
keyingtries=0
|
keyingtries=0
|
||||||
|
@ -5,7 +5,7 @@ config setup
|
|||||||
conn %default
|
conn %default
|
||||||
conn tunnel #
|
conn tunnel #
|
||||||
left=192.168.0.51
|
left=192.168.0.51
|
||||||
leftsubnet=192.168.0.0/16, 172.16.0.0/24
|
leftsubnet=192.168.1.0/24, 192.168.200.0/24, 172.16.0.0/24
|
||||||
right=192.168.0.52
|
right=192.168.0.52
|
||||||
rightsubnet=172.16.128.0/24
|
rightsubnet=172.16.128.0/24
|
||||||
ike=aes256-sha2_256-modp1024!
|
ike=aes256-sha2_256-modp1024!
|
||||||
|
1
s-lb-bd.retry
Normal file
1
s-lb-bd.retry
Normal file
@ -0,0 +1 @@
|
|||||||
|
localhost
|
1
s-mess.retry
Normal file
1
s-mess.retry
Normal file
@ -0,0 +1 @@
|
|||||||
|
localhost
|
1
s-nas.retry
Normal file
1
s-nas.retry
Normal file
@ -0,0 +1 @@
|
|||||||
|
localhost
|
Reference in New Issue
Block a user