Created
July 30, 2013 17:35
-
-
Save pmgarman/6115049 to your computer and use it in GitHub Desktop.
Puppet > Nginx > Ghost Proxy
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
class do-stuff { | |
include apt | |
include nginx | |
exec { 'first update': | |
command => '/usr/bin/apt-get update' | |
} | |
apt::ppa { 'ppa:chris-lea/node.js': | |
require => Exec['first update'], | |
} | |
exec { 'second update': | |
command => '/usr/bin/apt-get update', | |
require => Apt::Ppa['ppa:chris-lea/node.js'], | |
} | |
package { [ 'build-essential', 'git', 'nodejs', 'zip', 'unzip' ]: | |
ensure => latest, | |
require => Exec['second update'], | |
} | |
user { 'nodejs': | |
ensure => present, | |
managehome => true | |
} | |
nginx::resource::vhost { 'domain.com': | |
ensure => present, | |
proxy => 'http://127.0.0.1:2368', | |
} | |
nginx::resource::location { 'ghost': | |
ensure => present, | |
proxy => 'http://127.0.0.1:2368', | |
location => '/ghost', | |
vhost => 'domain.com', | |
location_cfg_append => { | |
'allow' => 'youriphere', | |
'deny' => 'all' | |
} | |
} | |
} | |
include do-stuff |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment