mirror of
https://github.com/dev-sec/ansible-collection-hardening
synced 2024-09-19 21:11:52 +00:00
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:
parent
8d3e452ce3
commit
c55c1f21ed
4 changed files with 10 additions and 1 deletions
1
.prettierignore
Normal file
1
.prettierignore
Normal file
|
@ -0,0 +1 @@
|
|||
CHANGELOG.md
|
|
@ -75,5 +75,8 @@ This role expects an existing installation of MySQL or MariaDB. Please ensure th
|
|||
- `mysql_remove_test_database`
|
||||
- Default: true
|
||||
- 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)
|
||||
|
|
|
@ -4,6 +4,8 @@ mysql_hardening_enabled: true
|
|||
|
||||
mysql_daemon_enabled: true
|
||||
|
||||
mysql_hardening_restart_mysql: true
|
||||
|
||||
# general configuration
|
||||
mysql_datadir: '/var/lib/mysql'
|
||||
mysql_hardening_mysql_hardening_conf_file: '{{mysql_hardening_mysql_confd_dir}}/hardening.cnf'
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
---
|
||||
|
||||
- name: restart mysql
|
||||
service: name='{{ mysql_daemon }}' state=restarted
|
||||
service:
|
||||
name: '{{ mysql_daemon }}'
|
||||
state: restarted
|
||||
when: mysql_hardening_restart_mysql | bool
|
||||
|
|
Loading…
Reference in a new issue