Commit 7ef59313 by Czémán Arnold Committed by cloud

nfs-client: fix selinux problem with nfs and libvirt

parent c5f358a2
...@@ -9,6 +9,21 @@ nfs-client: ...@@ -9,6 +9,21 @@ nfs-client:
- require_in: - require_in:
- mount: /datastore - mount: /datastore
{% if grains['os_family'] == 'RedHat' %}
nfs_selinux:
pkg.installed:
- pkgs:
- policycoreutils
- policycoreutils-python
selinux.boolean:
- name: virt_use_nfs
- value: True
- persist: True
- require:
- pkg: nfs-client
{% endif %}
/datastore: /datastore:
mount.mounted: mount.mounted:
- device: {{ pillar['nfs']['server'] }}:/datastore - device: {{ pillar['nfs']['server'] }}:/datastore
...@@ -18,3 +33,8 @@ nfs-client: ...@@ -18,3 +33,8 @@ nfs-client:
- pass_num: 2 - pass_num: 2
- persist: True - persist: True
- mkmnt: True - mkmnt: True
{% if grains['os_family'] == 'RedHat' %}
- require:
- pkg: nfs_selinux
{% endif %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment