Compare commits

...

4 Commits

Author SHA1 Message Date
1204c5e8a4 modif docker-compose.yml 2021-01-25 11:48:21 +01:00
7776d94f6c install bd 2021-01-25 11:32:19 +01:00
733e45410e Merge branch 'master' of https://gitea.lyc-lecastel.fr/gadmin/gsb2020 2021-01-25 09:29:48 +01:00
36c0d92c9f recup sur s-adm de wordpress 2021-01-25 08:56:13 +01:00
7 changed files with 23 additions and 5 deletions

View File

@@ -27,7 +27,7 @@ services:
volumes:
- nextcloud:/var/www/html
environment:
- MYSQL_PASSWORD=nextcloud
- MYSQL_PASSWORD=root
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=db

View File

@@ -7,7 +7,19 @@
state: present
- 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
copy : src=my.cnf dest=/etc/mysql/

View File

@@ -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"
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
apt-get -y install mysql-server
apt-get -y install mariadb-server
# 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
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

View File

@@ -0,0 +1,2 @@
depl_url: "http://s-adm.gsb.adm/gsbstore/"
depl_wordpress: "wordpress-5.6-fr_FR.tar.gz"

View File

@@ -5,9 +5,11 @@
state: directory
- name: download and extract wordpress
unarchive:
src: http://depl/gsbstore/wordpress-5.6-fr_FR.tar.gz
src: "{{ depl_url }}/{{ depl_wordpress }}"
dest: /home/
remote_src: yes
owner: www-data
group: www-data
- name: Copy sample config file
command: mv /home/wordpress/wp-config-sample.php /home/wordpress/wp-config.php creates=/home/wordpress/wp-config.php

1
s-lb-bd.retry Normal file
View File

@@ -0,0 +1 @@
localhost

1
s-nas.retry Normal file
View File

@@ -0,0 +1 @@
localhost