Saltstack Official Linux Formula
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- {%- from "linux/map.jinja" import system with context %}
- {%- if system.selinux is defined %}
-
- include:
- - linux.system.repo
-
- {%- if grains.os_family == 'RedHat' %}
-
- {%- if system.selinux == 'disabled' %}
- {%- set mode = 'permissive' %}
- {%- else %}
- {%- set mode = system.selinux %}
- {%- endif %}
-
- selinux_config:
- cmd.run:
- - name: "sed -i 's/SELINUX=[a-z][a-z]*$/SELINUX={{ system.selinux }}/' /etc/selinux/config"
- - unless: grep 'SELINUX={{ system.selinux }}' /etc/selinux/config
- - require:
- - pkg: linux_repo_prereq_pkgs
-
- {{ mode }}:
- selinux.mode
-
- {%- endif %}
-
- {%- endif %}
|