import du dossier ansible
This commit is contained in:
11
roles/mariadb/README.md
Normal file
11
roles/mariadb/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
mariadb
|
||||
=========
|
||||
|
||||
Install mariaDB
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
You have to set the default root password in mysqlRootPassword variable, otherwise it's "SuperPassw0rd" by default.
|
||||
|
||||
mysqlRootPassword: MySecurePassw0Rd
|
||||
2
roles/mariadb/defaults/main.yml
Normal file
2
roles/mariadb/defaults/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
mysqlRootPassord: root
|
||||
5
roles/mariadb/handlers/main.yml
Normal file
5
roles/mariadb/handlers/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: restart mariadb
|
||||
service:
|
||||
name: 'mariadb'
|
||||
state: restarted
|
||||
10
roles/mariadb/tasks/main.yml
Normal file
10
roles/mariadb/tasks/main.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
- name: Define MariaDB root password
|
||||
shell: "{{ item }}"
|
||||
with_items:
|
||||
- "echo mysql-server mysql-server/root_password password {{ mysqlRootPassword }} | debconf-set-selections"
|
||||
- "echo mysql-server mysql-server/root_password_again password {{ mysqlRootPassword }} | debconf-set-selections"
|
||||
|
||||
- name: Install MariaDB Server
|
||||
apt:
|
||||
name: mariadb-server
|
||||
Reference in New Issue
Block a user