Compare commits

...
Author SHA1 Message Date
Sebastian Gumprich 024295133c set ansible python interpreter in converge-step, too
Signed-off-by: Sebastian Gumprich <[email protected]>
2022-11-28 09:34:38 +01:00
Florian Goth 55779602fd ensure pymysql is present
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:59:00 +01:00
Florian Goth 01f0a5a456 fix zypper syntax
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:59:00 +01:00
Florian Goth dc45359e22 fix ansible syntax
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:59:00 +01:00
Florian Goth ddaff099e9 try the removes keyword of builtin.shell
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:59:00 +01:00
Florian Goth 8ac1629641 specify to use bash
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
Florian Goth 7ed6c97427 do the test for Suse on the shell and not in ansible
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
Florian Goth cfe86b4882 typo
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
Florian Goth de5f943f50 fix my yml...
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
Florian Goth 0d80ad8bf2 another try now with rpm.
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
Florian Goth 4852f9b956 another try
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
Florian Goth 9d474c95ec another try
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
Florian Goth 287404652d fix my yml
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
Florian Goth 7e1fbcdb8e another try at fixing the install
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
Florian Goth 7d6b030de9 python-xml
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
Florian Goth dec5acbf73 try zypper
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
Florian Goth d49148e352 Suse requires python-rpm
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
Florian Goth e6a949e75b use right ansible variable
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
Florian Goth 524974304d fix my yml.
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
Florian Goth add9a39497 Use python3 on opensuse
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
Florian Goth 8997d66491 add a note about the reuirement of the jmespath library.
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
Florian Goth d3714c319f enable pipeline
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
Florian Goth f9dbd0bbc4 Add variables for mariadb on opensuse
Signed-off-by: Florian Goth <[email protected]>
2022-11-28 08:58:38 +01:00
5 changed files with 31 additions and 7 deletions

No files matched your search

+1 -1
View File
@@ -37,7 +37,7 @@ jobs:
- debian11
# - amazon # geerlingguy.mysql does not support fedora
# - arch # needs to be fixed
# - opensuse_tumbleweed # needs to be fixed
- opensuse_tumbleweed # needs to be fixed
# - fedora # geerlingguy.mysql does not support fedora
steps:
- name: Checkout repo
+13
View File
@@ -24,6 +24,19 @@
- mysql_python_package_debian is not defined
- ansible_distribution != "Ubuntu"
- ansible_distribution_major_version|int < 20
- name: Use Python 3 on Suse
set_fact:
ansible_python_interpreter: /usr/bin/python3
when:
- ansible_os_family == 'Suse'
- name: install required python packages on Suse
ansible.builtin.shell: zypper -n install python-xml python3-rpm python3-PyMySQL
args:
removes: /usr/bin/zypper
- include_role:
name: mysql_hardening
vars:
+6 -6
View File
@@ -15,6 +15,12 @@
- ansible_distribution == 'Debian'
- ansible_distribution_major_version|int >= 11
- name: Use Python 3 on Suse
set_fact:
ansible_python_interpreter: /usr/bin/python3
when:
- ansible_os_family == 'Suse'
- name: Use Python 2 on Debian 10
set_fact:
ansible_python_interpreter: /usr/bin/python
@@ -29,12 +35,6 @@
update_cache: true
when: ansible_os_family == 'Debian'
- name: install required tools on SuSE
community.general.zypper:
name: "python-xml"
state: present
when: ansible_facts.os_family == 'Suse'
- name: create missing directory
file:
path: "/etc/mysql/conf.d"
+1
View File
@@ -16,6 +16,7 @@ It configures:
- Ansible 2.9.0
- An existing MySQL installation
- python-jmespath on the ansible host
### Example playbook
+10
View File
@@ -0,0 +1,10 @@
---
mysql_daemon: mariadb
mysql_hardening_mysql_conf_file: '/etc/my.cnf'
mysql_hardening_mysql_confd_dir: '/etc/my.cnf.d'
mysql_cnf_owner: 'root' # owner of /etc/my.cnf.d/*.cnf files
mysql_cnf_group: 'mysql' # owner of /etc/my.cnf.d/*.cnf files
mysql_hardening_group: 'mysql'
login_unix_socket: '/run/mysql/mysql.sock'