Showing with 46 additions and 12 deletions.
  1. +10 −1 CHANGELOG.md
  2. +14 −0 data/common.yaml
  3. +6 −0 hiera.yaml
  4. +15 −10 manifests/init.pp
  5. +1 −1 metadata.json
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not affect the functionality of the module.

## [v1.5.0](https://github.com/voxpupuli/puppet-selinux/tree/v1.5.0) (2017-12-15)

[Full Changelog](https://github.com/voxpupuli/puppet-selinux/compare/v1.4.0...v1.5.0)

**Merged pull requests:**

- Add exec\_restorecon to hiera calls [\#243](https://github.com/voxpupuli/puppet-selinux/pull/243) ([FStelzer](https://github.com/FStelzer))
- release 1.4.0 [\#242](https://github.com/voxpupuli/puppet-selinux/pull/242) ([bastelfreak](https://github.com/bastelfreak))

## [v1.4.0](https://github.com/voxpupuli/puppet-selinux/tree/v1.4.0) (2017-11-19)

[Full Changelog](https://github.com/voxpupuli/puppet-selinux/compare/v1.3.0...v1.4.0)
Expand Down Expand Up @@ -396,4 +405,4 @@ These should not affect the functionality of the module.



\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
14 changes: 14 additions & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
lookup_options:
selinux::boolean:
merge: hash
selinux::fcontext:
merge: hash
selinux::module:
merge: hash
selinux::permissive:
merge: hash
selinux::port:
merge: hash
selinux::exec_restorecon:
merge: hash
6 changes: 6 additions & 0 deletions hiera.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
version: 5

hierarchy:
- name: "common"
path: "common.yaml"
25 changes: 15 additions & 10 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
# @param module Hash of selinux::module resource parameters
# @param permissive Hash of selinux::module resource parameters
# @param port Hash of selinux::port resource parameters
# @param exec_restorecon Hash of selinux::exec_restorecon resource parameters
#
class selinux (
Optional[Enum['enforcing', 'permissive', 'disabled']] $mode = $::selinux::params::mode,
Expand All @@ -44,11 +45,12 @@
Enum['refpolicy', 'simple'] $default_builder = 'simple',

### START Hiera Lookups ###
$boolean = undef,
$fcontext = undef,
$module = undef,
$permissive = undef,
$port = undef,
Optional[Hash] $boolean = undef,
Optional[Hash] $fcontext = undef,
Optional[Hash] $module = undef,
Optional[Hash] $permissive = undef,
Optional[Hash] $port = undef,
Optional[Hash] $exec_restorecon = undef,
### END Hiera Lookups ###

) inherits selinux::params {
Expand All @@ -61,19 +63,22 @@
class { '::selinux::config': }

if $boolean {
create_resources ( 'selinux::boolean', hiera_hash('selinux::boolean', $boolean) )
create_resources ( 'selinux::boolean', $boolean )
}
if $fcontext {
create_resources ( 'selinux::fcontext', hiera_hash('selinux::fcontext', $fcontext) )
create_resources ( 'selinux::fcontext', $fcontext )
}
if $module {
create_resources ( 'selinux::module', hiera_hash('selinux::module', $module) )
create_resources ( 'selinux::module', $module )
}
if $permissive {
create_resources ( 'selinux::permissive', hiera_hash('selinux::permissive', $permissive) )
create_resources ( 'selinux::permissive', $permissive )
}
if $port {
create_resources ( 'selinux::port', hiera_hash('selinux::port', $port) )
create_resources ( 'selinux::port', $port )
}
if $exec_restorecon {
create_resources ( 'selinux::exec_restorecon', $exec_restorecon )
}

# Ordering
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppet-selinux",
"version": "1.4.0",
"version": "1.5.0",
"author": "Vox Pupuli",
"summary": "This class manages SELinux on RHEL based systems",
"license": "Apache-2.0",
Expand Down