Skip to content

Instantly share code, notes, and snippets.

@TAKAyukiatkwsk
Created November 3, 2013 14:33
Show Gist options
  • Save TAKAyukiatkwsk/7290850 to your computer and use it in GitHub Desktop.
Save TAKAyukiatkwsk/7290850 to your computer and use it in GitHub Desktop.
Setting nginx on Arch Linux with puppet
http{
server {
listen <%= port %>;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html;
}
}
}
package { 'nginx':
ensure => installed,
}
$port = 80
file { '/etc/nginx/nginx.conf':
ensure => present,
owner => 'root',
group => 'root',
mode => '0644',
content => template('nginx.conf'),
require => Package['nginx'],
notify => Service['nginx'],
}
$target = 'Puppet'
service { 'nginx':
enable => true,
ensure => running,
hasrestart => true,
require => File['/etc/nginx/nginx.conf'],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment