fix(googleauth): handle disabled selinux

This commit is contained in:
Pascal de Bruijn 2022-06-14 14:22:39 +02:00
parent 3fe875040d
commit 63dd7c88be

View File

@ -15,7 +15,7 @@ users_{{ users.googleauth_dir }}:
- group: {{ users.root_group }} - group: {{ users.root_group }}
- mode: '0700' - mode: '0700'
{%- if grains['os_family'] == 'RedHat' %} {%- if grains['os_family'] == 'RedHat' and "selinux" in grains and grains.selinux.enabled %}
policycoreutils-package: policycoreutils-package:
pkg.installed: pkg.installed:
- pkgs: - pkgs:
@ -67,7 +67,7 @@ users_googleauth-pam-{{ svc }}-{{ name }}:
{%- endif %} {%- endif %}
{%- endfor %} {%- endfor %}
{%- if grains['os_family'] == 'RedHat' %} {%- if grains['os_family'] == 'RedHat' and "selinux" in grains and grains.selinux.enabled %}
users_googleauth_selinux_applied: users_googleauth_selinux_applied:
selinux.fcontext_policy_applied: selinux.fcontext_policy_applied:
- name: {{ users.googleauth_dir }} - name: {{ users.googleauth_dir }}