Compare commits

...

8 Commits

11 changed files with 42 additions and 14 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

@ -2,6 +2,7 @@
- name: Creation du repertoire nextcloud
file:
path: /root/nextcloud
state: directory
- name: Copie du script get_docker
copy:
@ -11,12 +12,20 @@
- name: Execution du script get_docker
script: /root/nextcloud/get_docker.sh
- name: Copie de docker-compose
copy:
src: docker-compose.yml
dest: /usr/local/bin
- name: Installation de docker-compose
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
- name: Execution de la commande docker-compose up -d
shell:
cmd: docker-compose up -d
- name: Attribution des droits de docker compose
file:
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

View File

@ -95,7 +95,7 @@ NRPEServer = enabled
```
Redémarrez le service NSClient++:
Redémarrez le service NSClient++ via le **cmd**:
```
@ -114,4 +114,4 @@ systemctl restart icinga
```
Les services de la machine **srv-2012** apparaissent en **UP**.
Les services de la machine **srv-2012** apparaissent en **OK**.

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-mess.retry Normal file
View File

@ -0,0 +1 @@
localhost

1
s-nas.retry Normal file
View File

@ -0,0 +1 @@
localhost