34 lines
752 B
YAML
34 lines
752 B
YAML
- name: "Feed MariaDB root password to debconf"
|
|
debconf:
|
|
name: "mariadb-server"
|
|
question: "{{ item }}"
|
|
value: "{{ credentials.mysql_root.password }}"
|
|
vtype: password
|
|
changed_when: False
|
|
with_items:
|
|
- mysql-server/root_password
|
|
- mysql-server/root_password_again
|
|
|
|
- name: "Install MariaDB / Galera"
|
|
apt:
|
|
name: "mariadb-server"
|
|
state: present
|
|
|
|
- name: "Install Mariabackup"
|
|
apt:
|
|
name: "mariadb-backup"
|
|
state: present
|
|
|
|
- name: "Install required Python MySQL module for db management via Ansible"
|
|
apt:
|
|
name: "{{ vars.python_package }}-mysqldb"
|
|
state: present
|
|
|
|
- name: "Configure /root/.my.cnf"
|
|
template:
|
|
src: my.cnf.j2
|
|
dest: /root/.my.cnf
|
|
owner: root
|
|
group: root
|
|
mode: 0400
|