Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow packages to be upgraded #16

Merged
merged 5 commits into from
Sep 8, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
}

exec { "change-selinux-status-to-${mode}":
command => "echo ${sestatus} > /${sx_fs_mount}/enforce",
unless => "grep -q '${sestatus}' /${sx_fs_mount}/enforce",
command => "echo ${sestatus} > /${::selinux::params::sx_fs_mount}/enforce",
unless => "grep -q '${sestatus}' /${::selinux::params::sx_fs_mount}/enforce",
}
} else {
fail("Invalid mode specified for SELinux: ${mode}")
Expand Down
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#
class selinux (
$mode = $::selinux::params::mode,
$package_ensure = $::selinux::params::package_ensure,
) inherits selinux::params {

include stdlib
Expand Down
20 changes: 20 additions & 0 deletions manifests/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "jfryman/selinux",
"version": "0.1.1",
"author": "jfryman",
"summary": "This class manages SELinux on RHEL based systems",
"license": "Apache 2.0",
"source": "https://github.com/jfryman/puppet-selinux",
"project_page": "https://github.com/jfryman/puppet-selinux",
"issues_url": "https://github.com/jfryman/puppet-selinux/issues",
"dependencies": [
{
"name": "puppetlabs-stdlib",
"version_range": ">= 4.0.0"
},
{
"name": "puppetlabs-concat",
"version_range": ">= 1.0.0"
}
]
}
4 changes: 2 additions & 2 deletions manifests/package.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
case $::operatingsystemrelease {
/^5.+$/: {
package { 'policycoreutils':
ensure => present,
ensure => $selinux::params::package_ensure,
}
}
/^(6|7).+$/: {
package { 'policycoreutils-python':
ensure => present,
ensure => $selinux::params::package_ensure,
}
}
default: {
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
class selinux::params {
$sx_mod_dir = '/usr/share/selinux'
$mode = 'disabled'
$package_ensure = present

$sx_fs_mount = $::operatingsystem ? {
/RedHat|CentOS/ => $::operatingsystemrelease ? {
Expand Down