File tree Expand file tree Collapse file tree 5 files changed +28
-7
lines changed Expand file tree Collapse file tree 5 files changed +28
-7
lines changed Original file line number Diff line number Diff line change 37
37
- debian11
38
38
# - amazon # geerlingguy.mysql does not support fedora
39
39
# - arch # needs to be fixed
40
- # - opensuse_tumbleweed # needs to be fixed
40
+ - opensuse_tumbleweed # needs to be fixed
41
41
# - fedora # geerlingguy.mysql does not support fedora
42
42
steps :
43
43
- name : Checkout repo
Original file line number Diff line number Diff line change 24
24
- mysql_python_package_debian is not defined
25
25
- ansible_distribution != "Ubuntu"
26
26
- ansible_distribution_major_version|int < 20
27
+
28
+ - name : Use Python 3 on Suse
29
+ set_fact :
30
+ ansible_python_interpreter : /usr/bin/python3
31
+ when :
32
+ - ansible_os_family == 'Suse'
33
+
27
34
- include_role :
28
35
name : mysql_hardening
29
36
vars :
Original file line number Diff line number Diff line change 15
15
- ansible_distribution == 'Debian'
16
16
- ansible_distribution_major_version|int >= 11
17
17
18
+ - name : Use Python 3 on Suse
19
+ set_fact :
20
+ ansible_python_interpreter : /usr/bin/python3
21
+ when :
22
+ - ansible_os_family == 'Suse'
23
+
18
24
- name : Use Python 2 on Debian 10
19
25
set_fact :
20
26
ansible_python_interpreter : /usr/bin/python
29
35
update_cache : true
30
36
when : ansible_os_family == 'Debian'
31
37
32
- - name : install required tools on SuSE
33
- community.general.zypper :
34
- name : " python-xml"
35
- state : present
36
- when : ansible_facts.os_family == 'Suse'
38
+ - name : Install required python packages on Suse
39
+ ansible.builtin.shell : zypper -n install python-xml python3-rpm python3-PyMySQL
40
+ when : ansible_os_family == 'Suse'
37
41
38
42
- name : create missing directory
39
43
file :
56
60
- ansible_distribution != "Ubuntu"
57
61
- ansible_distribution_major_version|int < 20
58
62
59
-
60
63
- include_role :
61
64
name : dev-sec.mysql
62
65
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ It configures:
16
16
17
17
- Ansible 2.9.0
18
18
- An existing MySQL installation
19
+ - python-jmespath on the ansible host
19
20
20
21
### Example playbook
21
22
Original file line number Diff line number Diff line change
1
+ ---
2
+ mysql_daemon : mariadb
3
+ mysql_hardening_mysql_conf_file : ' /etc/my.cnf'
4
+ mysql_hardening_mysql_confd_dir : ' /etc/my.cnf.d'
5
+
6
+ mysql_cnf_owner : ' root' # owner of /etc/my.cnf.d/*.cnf files
7
+ mysql_cnf_group : ' mysql' # owner of /etc/my.cnf.d/*.cnf files
8
+
9
+ mysql_hardening_group : ' mysql'
10
+ login_unix_socket : ' /run/mysql/mysql.sock'
You can’t perform that action at this time.
0 commit comments