Created
November 3, 2013 14:33
-
-
Save TAKAyukiatkwsk/7290850 to your computer and use it in GitHub Desktop.
Setting nginx on Arch Linux with puppet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http{ | |
server { | |
listen <%= port %>; | |
server_name localhost; | |
location / { | |
root /usr/share/nginx/html; | |
index index.html; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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