Skip to content

Commit

Permalink
Merge pull request voxpupuli#183 from drfeelngood/nx_daemon_user_for_…
Browse files Browse the repository at this point in the history
…oracle_linux

Update params to account for oracle linux.
  • Loading branch information
James Fryman committed Nov 22, 2013
2 parents 5f31637 + 8da21ee commit 3a1b487
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion manifests/package/redhat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# fedora 19 has 1.4.x packages are in

# fedora 18 users will need to supply their own nginx 1.4 rpms and/or repo
if $::lsbmajdistrelease < 19 {
if $::lsbmajdistrelease and $::lsbmajdistrelease < 19 {
notice("${::operatingsystem} ${::lsbmajdistrelease} does not supply nginx >= 1.4 packages")
}
}
Expand Down
15 changes: 12 additions & 3 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,18 @@
/(?i-mx:linux)/ => '/var/run/nginx.pid',
}

$nx_daemon_user = $::operatingsystem ? {
/(?i-mx:debian|ubuntu)/ => 'www-data',
/(?i-mx:fedora|rhel|redhat|centos|scientific|suse|opensuse|amazon|gentoo)/ => 'nginx',
if $::osfamily {
$nx_daemon_user = $::osfamily ? {
/(?i-mx:redhat|suse|gentoo|linux)/ => 'nginx',
/(?i-mx:debian)/ => 'www-data',
}
} else {
warning('$::osfamily not defined. Support for $::operatingsystem is deprecated')
warning("Please upgrade from factor ${::facterversion} to >= 1.7.2")
$nx_daemon_user = $::operatingsystem ? {
/(?i-mx:debian|ubuntu)/ => 'www-data',
/(?i-mx:fedora|rhel|redhat|centos|scientific|suse|opensuse|amazon|gentoo|oraclelinux)/ => 'nginx',
}
}

# Service restart after Nginx 0.7.53 could also be just
Expand Down

0 comments on commit 3a1b487

Please sign in to comment.