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

Amazon Linux support #39

Merged
merged 3 commits into from
Jan 23, 2013
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
6 changes: 6 additions & 0 deletions manifests/package.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
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'],
Expand Down
20 changes: 20 additions & 0 deletions manifests/package/amazon.pp
Original file line number Diff line number Diff line change
@@ -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,
}
}
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

$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"
Expand Down
4 changes: 2 additions & 2 deletions templates/vhost/vhost_location_directory.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>;
Expand Down