This repository has been archived by the owner on Jul 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
mariadb_servers.yml
73 lines (59 loc) · 2.02 KB
/
mariadb_servers.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# passbolt_ansible
# Copyright (C) 2019 NeuroForge GmbH & Co.KG <https://neuroforge.de/>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
---
- hosts: mariadb
become: true
vars:
ansible_ssh_private_key_file: "{{playbook_dir}}/ssh_keys/root_rsa"
ansible_user: "root"
apt_update_cache: True
apt_restart_after_dist_upgrade: True
setup_additional_groups:
- name: "mysql"
requires_root_password: True
setup_additional_users:
- name: "mysql"
group: "mysql"
is_sudo: False
ssl_cert_dirs:
- directory: "{{ mariadb_cert_dir }}"
owner: mysql
group: mysql
roles:
- role: user-setup
- role: copy-ssl-certs
- hosts: mariadb
become: true
vars:
ansible_ssh_private_key_file: "{{playbook_dir}}/ssh_keys/root_rsa"
ansible_user: "root"
apt_update_cache: True
mysql_user_home: /home/mysql
mysql_user_name: mysql
mysql_user_password: mysql
mysql_root_password_update: false
mysql_enabled_on_startup: true
mysql_config_include_files:
- src: "files/mariadb_configs/{{ inventory_hostname }}/99-config.cnf"
force: yes
mysql_port: "3306"
mysql_bind_address: '0.0.0.0'
mysql_datadir: /var/lib/mysql
mysql_packages:
- mariadb-client-10.1
- mariadb-server-10.1
- python-mysqldb
overwrite_global_mycnf: true
roles:
- role: geerlingguy.mysql
- role: mariadb-post-setup