Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Merge pull request #50 from dev-sec/modes
Browse files Browse the repository at this point in the history
add modes to template and file tasks
  • Loading branch information
rndmh3ro authored Sep 19, 2020
2 parents 25623b0 + 17f2140 commit bfc80e8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- name: protect my.cnf
file:
path: '{{ mysql_hardening_mysql_conf_file }}'
mode: '0400'
mode: '0640'
owner: '{{ mysql_cnf_owner }}'
group: '{{ mysql_cnf_owner }}'
follow: true
Expand All @@ -15,21 +15,23 @@
state: directory
owner: '{{ mysql_hardening_user }}'
group: '{{ mysql_hardening_user }}'
mode: '0750'

- name: ensure permissions on mysql-logfile are correct
file:
path: '{{ mysql_hardening_log_file }}'
state: file
owner: '{{ mysql_hardening_user }}'
group: '{{ mysql_hardening_group }}'
mode: '0640'

- name: check mysql configuration-directory exists and has right permissions
file:
path: '{{ mysql_hardening_mysql_confd_dir }}'
state: directory
owner: '{{ mysql_hardening_user }}'
group: '{{ mysql_hardening_group }}'
mode: '0570'
mode: '0750'

- name: check include-dir directive is present in my.cnf
lineinfile:
Expand All @@ -46,7 +48,7 @@
dest: '{{ mysql_hardening_mysql_hardening_conf_file }}'
owner: '{{ mysql_cnf_owner }}'
group: '{{ mysql_cnf_group }}'
mode: '0460'
mode: '0640'
notify: restart mysql

- name: enable mysql
Expand Down

0 comments on commit bfc80e8

Please sign in to comment.