mirror of
https://github.com/saltstack-formulas/mysql-formula.git
synced 2025-04-16 09:40:26 +00:00
Add prereq & wait to disable/reenable SELinux during package install
This commit is contained in:
parent
9f3678bbe2
commit
8fcca674bc
1 changed files with 17 additions and 0 deletions
|
@ -23,3 +23,20 @@ my.cnf:
|
||||||
- watch_in:
|
- watch_in:
|
||||||
- service: mysqld
|
- service: mysqld
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
# Set SELinux to permissive mode while installing mysqld otherwise the
|
||||||
|
# mysql user will not be created; restore enforcing when done.
|
||||||
|
{% if (grains['os_family'] == 'RedHat'
|
||||||
|
and salt['cmd.run']("sestatus | awk '/Current mode/ { print $3 }'") == 'enforcing') %}
|
||||||
|
selinux_permissive:
|
||||||
|
cmd.run:
|
||||||
|
- name: setenforce permissive
|
||||||
|
- prereq:
|
||||||
|
- pkg: mysqld
|
||||||
|
|
||||||
|
selinux_enforcing:
|
||||||
|
cmd.wait:
|
||||||
|
- name: setenforce enforcing
|
||||||
|
- watch_in:
|
||||||
|
- pkg: mysqld
|
||||||
|
{% endif %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue