install bd
This commit is contained in:
parent
733e45410e
commit
7776d94f6c
@ -7,7 +7,19 @@
|
|||||||
state: present
|
state: present
|
||||||
|
|
||||||
- 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/
|
||||||
|
@ -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
|
||||||
|
1
s-lb-bd.retry
Normal file
1
s-lb-bd.retry
Normal file
@ -0,0 +1 @@
|
|||||||
|
localhost
|
Loading…
x
Reference in New Issue
Block a user