Premier commit
This commit is contained in:
commit
518c7ab04b
49 files changed
+1120
No files matched your search
@@ -0,0 +1,58 @@
|
||||
---
|
||||
# MariaDB/tasks/install_mariadb.yml
|
||||
|
||||
- name: Install MariaDB on RedHat based systems
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items:
|
||||
- mariadb-server
|
||||
- mariadb
|
||||
- python3-PyMySQL
|
||||
when: (ansible_distribution == "Red Hat Entreprise Linux") or
|
||||
(ansible_distribution == "Rocky") or
|
||||
(ansible_distribution == "Fedora") or
|
||||
(ansible_distribution == "AlmaLinux") or
|
||||
(ansible_distribution == "openSUSE Leap")
|
||||
|
||||
- name: Install MariaDB on Debian/Ubuntu systems
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items:
|
||||
- mariadb-server
|
||||
- mariadb-client
|
||||
- python3-mysqldb
|
||||
when: (ansible_distribution == "Ubuntu") or
|
||||
(ansible_distribution == "Debian")
|
||||
|
||||
- name: Start and enable MariaDB service
|
||||
service:
|
||||
name: mariadb
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
# mysql_secure_installation
|
||||
#- name: Update MariaDB root password
|
||||
# mysql_user: name=root host=localhost password={{mariadb_root_password}}
|
||||
# with_items:
|
||||
# - 127.0.0.1
|
||||
# - ::1
|
||||
# - VM
|
||||
|
||||
# mysql_secure_installation
|
||||
- name: Update MariaDB root password
|
||||
community.mysql.mysql_user:
|
||||
login_user: root
|
||||
login_password: ''
|
||||
user: root
|
||||
password: "{{ mariadb_root_password }}"
|
||||
|
||||
# mysql_secure_installation
|
||||
- name: Remove MySQL test database
|
||||
mysql_db:
|
||||
name: test
|
||||
state: absent
|
||||
# après Update MariaDB root password
|
||||
login_user: root
|
||||
login_password: "{{ mariadb_root_password }}"
|
||||
Reference in new issue
Block a user