Skip to content

Instantly share code, notes, and snippets.

@pmgarman
Created July 30, 2013 17:35
Show Gist options
  • Save pmgarman/6115049 to your computer and use it in GitHub Desktop.
Save pmgarman/6115049 to your computer and use it in GitHub Desktop.
Puppet > Nginx > Ghost Proxy
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