commit
6d2be4800d
4 changed files with 29 additions and 3 deletions
|
@ -24,6 +24,12 @@ class nginx::package {
|
|||
before => Anchor['nginx::package::end'],
|
||||
}
|
||||
}
|
||||
amazon: {
|
||||
class { 'nginx::package::amazon':
|
||||
require => Anchor['nginx::package::begin'],
|
||||
before => Anchor['nginx::package::end'],
|
||||
}
|
||||
}
|
||||
debian,ubuntu: {
|
||||
class { 'nginx::package::debian':
|
||||
require => Anchor['nginx::package::begin'],
|
||||
|
|
20
manifests/package/amazon.pp
Normal file
20
manifests/package/amazon.pp
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Class: nginx::package::amazon
|
||||
#
|
||||
# This module manages NGINX package installation on ec2 amazon linux based systems
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# There are no default parameters for this class.
|
||||
#
|
||||
# Actions:
|
||||
#
|
||||
# Requires:
|
||||
#
|
||||
# Sample Usage:
|
||||
#
|
||||
# This class file is not called directly
|
||||
class nginx::package::amazon {
|
||||
package { 'nginx':
|
||||
ensure => present,
|
||||
}
|
||||
}
|
|
@ -52,7 +52,7 @@ class nginx::params {
|
|||
|
||||
$nx_daemon_user = $::operatingsystem ? {
|
||||
/(?i-mx:debian|ubuntu)/ => 'www-data',
|
||||
/(?i-mx:fedora|rhel|redhat|centos|scientific|suse|opensuse)/ => 'nginx',
|
||||
/(?i-mx:fedora|rhel|redhat|centos|scientific|suse|opensuse|amazon)/ => 'nginx',
|
||||
}
|
||||
|
||||
# Service restart after Nginx 0.7.53 could also be just "/path/to/nginx/bin -s HUP"
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<%= key %> <%= value %>;
|
||||
<% end -%><% end -%>
|
||||
root <%= www_root %>;
|
||||
<% if has_variable?("try_files") then %>
|
||||
<% if @try_files -%>
|
||||
try_files <% try_files.each do |try| -%> <%= try %> <% end -%>;
|
||||
<% end %>
|
||||
<% end -%>
|
||||
index <% index_files.each do |i| %> <%= i %> <% end %>;
|
||||
<% if @location_cfg_append -%><% location_cfg_append.each do |key,value| -%>
|
||||
<%= key %> <%= value %>;
|
||||
|
|
Loading…
Reference in a new issue