add restart handler variable for mysql role (#399)

* add restart handler variable for mysql role

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* add prettierignore file to ignore CHANGELOG

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
This commit is contained in:
Sebastian Gumprich 2021-02-10 15:54:57 +01:00 committed by GitHub
parent 8d3e452ce3
commit c55c1f21ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 1 deletions

1
.prettierignore Normal file
View file

@ -0,0 +1 @@
CHANGELOG.md

View file

@ -75,5 +75,8 @@ This role expects an existing installation of MySQL or MariaDB. Please ensure th
- `mysql_remove_test_database` - `mysql_remove_test_database`
- Default: true - Default: true
- Description: remove test database - Description: remove test database
- `mysql_hardening_restart_mysql`
- Default: true
- Description: Restart mysql after running this role
Further information is available at [Deutsche Telekom (German)](http://www.telekom.com/static/-/155996/7/technische-sicherheitsanforderungen-si) and [Symantec](http://www.symantec.com/connect/articles/securing-mysql-step-step) Further information is available at [Deutsche Telekom (German)](http://www.telekom.com/static/-/155996/7/technische-sicherheitsanforderungen-si) and [Symantec](http://www.symantec.com/connect/articles/securing-mysql-step-step)

View file

@ -4,6 +4,8 @@ mysql_hardening_enabled: true
mysql_daemon_enabled: true mysql_daemon_enabled: true
mysql_hardening_restart_mysql: true
# general configuration # general configuration
mysql_datadir: '/var/lib/mysql' mysql_datadir: '/var/lib/mysql'
mysql_hardening_mysql_hardening_conf_file: '{{mysql_hardening_mysql_confd_dir}}/hardening.cnf' mysql_hardening_mysql_hardening_conf_file: '{{mysql_hardening_mysql_confd_dir}}/hardening.cnf'

View file

@ -1,4 +1,7 @@
--- ---
- name: restart mysql - name: restart mysql
service: name='{{ mysql_daemon }}' state=restarted service:
name: '{{ mysql_daemon }}'
state: restarted
when: mysql_hardening_restart_mysql | bool