mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-16 17:50:27 +00:00
Merge pull request #248 from noelmcloughlin/fixes
selinux fcontext for postgres_database.present
This commit is contained in:
commit
7cb86d1183
1 changed files with 23 additions and 0 deletions
|
@ -223,6 +223,29 @@ postgresql-tablespace-dir-{{ name }}:
|
||||||
- require:
|
- require:
|
||||||
- pkg: postgresql-server
|
- pkg: postgresql-server
|
||||||
|
|
||||||
|
{%- if "selinux" in grains and grains.selinux.enabled %}
|
||||||
|
|
||||||
|
pkg.installed:
|
||||||
|
- names:
|
||||||
|
- policycoreutils-python
|
||||||
|
- selinux-policy-targeted
|
||||||
|
- refresh: True
|
||||||
|
selinux.fcontext_policy_present:
|
||||||
|
- name: '{{ tblspace.directory }}(/.*)?'
|
||||||
|
- sel_type: postgresql_db_t
|
||||||
|
- require:
|
||||||
|
- file: postgresql-tablespace-dir-{{ name }}
|
||||||
|
- pkg: postgresql-tablespace-dir-{{ name }}
|
||||||
|
|
||||||
|
postgresql-tablespace-dir-{{ name }}-fcontext:
|
||||||
|
selinux.fcontext_policy_applied:
|
||||||
|
- name: {{ tblspace.directory }}
|
||||||
|
- recursive: True
|
||||||
|
- require:
|
||||||
|
- selinux: postgresql-tablespace-dir-{{ name }}
|
||||||
|
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
{%- if not postgres.bake_image %}
|
{%- if not postgres.bake_image %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue