forked from salt-formulas/salt-formula-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is fix for salt-formulas#182 part 2. Add backward compatibility.
- We will check now if pillar system.selinux is a map for new format - If system.selinux is not a map use old format - policycoreutils and policycoreutils-python are not nessasary for basic selinux configuration we need this packages later to add selinux rules. - Added new format to test pillars
- Loading branch information
Nick Metz
authored and
Nick Metz
committed
Nov 22, 2018
1 parent
9d259d4
commit a8dee64
Showing
3 changed files
with
15 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
{%- from "linux/map.jinja" import system with context %} | ||
{%- if system.selinux is defined %} | ||
{%- if grains.os_family == 'RedHat' %} | ||
{% if system.selinux is mapping %} | ||
{% if system.selinux.pkgs %} | ||
linux_system_selinux_pkgs: | ||
pkg.installed: | ||
- pkgs: {{ system.selinux.pkgs }} | ||
{%- endif %} | ||
{%- if grains.os_family == 'RedHat' %} | ||
{%- if system.selinux.mode %} | ||
{{ system.selinux.mode }}: | ||
selinux.mode: | ||
- require: | ||
- pkg: linux_system_selinux_pkgs | ||
{%- endif %} | ||
{%- else %} | ||
{{ system.selinux }}: | ||
selinux.mode | ||
{%- endif %} | ||
{%- endif %} | ||
{%- endif %} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters