* Add variables for mariadb on opensuse Signed-off-by: Florian Goth <[email protected]> * enable pipeline Signed-off-by: Florian Goth <[email protected]> * add a note about the reuirement of the jmespath library. Signed-off-by: Florian Goth <[email protected]> * Use python3 on opensuse Signed-off-by: Florian Goth <[email protected]> * fix my yml. Signed-off-by: Florian Goth <[email protected]> * use right ansible variable Signed-off-by: Florian Goth <[email protected]> * Suse requires python-rpm Signed-off-by: Florian Goth <[email protected]> * try zypper Signed-off-by: Florian Goth <[email protected]> * python-xml Signed-off-by: Florian Goth <[email protected]> * another try at fixing the install Signed-off-by: Florian Goth <[email protected]> * fix my yml Signed-off-by: Florian Goth <[email protected]> * another try Signed-off-by: Florian Goth <[email protected]> * another try Signed-off-by: Florian Goth <[email protected]> * another try now with rpm. Signed-off-by: Florian Goth <[email protected]> * fix my yml... Signed-off-by: Florian Goth <[email protected]> * typo Signed-off-by: Florian Goth <[email protected]> * do the test for Suse on the shell and not in ansible Signed-off-by: Florian Goth <[email protected]> * specify to use bash Signed-off-by: Florian Goth <[email protected]> * specify to use bash * try the removes keyword of builtin.shell Signed-off-by: Florian Goth <[email protected]> * fix ansible syntax Signed-off-by: Florian Goth <[email protected]> * fix zypper syntax Signed-off-by: Florian Goth <[email protected]> * ensure pymysql is present Signed-off-by: Florian Goth <[email protected]> * set ansible python interpreter in converge-step, too Signed-off-by: Sebastian Gumprich <[email protected]> * move install task to prepare Signed-off-by: Sebastian Gumprich <[email protected]> Signed-off-by: Florian Goth <[email protected]> Signed-off-by: Sebastian Gumprich <[email protected]> Co-authored-by: Florian Goth <[email protected]>
42 lines
1.5 KiB
YAML
42 lines
1.5 KiB
YAML
---
|
|
- name: wrapper playbook for kitchen testing "ansible-mysql-hardening"
|
|
hosts: all
|
|
become: true
|
|
collections:
|
|
- devsec.hardening
|
|
environment:
|
|
http_proxy: "{{ lookup('env', 'http_proxy') | default(omit) }}"
|
|
https_proxy: "{{ lookup('env', 'https_proxy') | default(omit) }}"
|
|
no_proxy: "{{ lookup('env', 'no_proxy') | default(omit) }}"
|
|
tasks:
|
|
- name: Determine required MySQL Python libraries (Ubuntu Focal Fossa ++)
|
|
set_fact:
|
|
mysql_python_package_debian: "python3-pymysql"
|
|
when:
|
|
- mysql_python_package_debian is not defined
|
|
- ansible_distribution == "Ubuntu"
|
|
- ansible_distribution_major_version|int > 19
|
|
|
|
- name: Determine required MySQL Python libraries.
|
|
set_fact:
|
|
mysql_python_package_debian: "{% if 'python3' in ansible_python_interpreter|default('') %}python3-mysqldb{% else %}python-mysqldb{% endif %}"
|
|
when:
|
|
- 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'
|
|
|
|
- include_role:
|
|
name: mysql_hardening
|
|
vars:
|
|
overwrite_global_mycnf: false
|
|
mysql_root_password: iloverandompasswordsbutthiswilldo
|
|
mysql_user_password: iloverandompasswordsbutthiswilldo
|
|
mysql_config_file: /etc/mysql/mariadb.cnf
|
|
mysql_root_password_update: true
|