Skip to content

Instantly share code, notes, and snippets.

@kenperkins
Created June 23, 2011 18:56
Show Gist options
  • Save kenperkins/1043300 to your computer and use it in GitHub Desktop.
Save kenperkins/1043300 to your computer and use it in GitHub Desktop.
Random error.
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Cannot find definition Nodejs::Nginxproxymember at line 5 on node nginx-01.chicago.il.private.test.clpbrd.com
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
# modules/nodejs/manifests/init.pp
class nodejs {
@@nginxproxymember { "${fqdn}":
url => "${fqdn}:3000",
}
define nodejs::nginxproxymember($url) {
file { "/etc/nginx/upstream/worker_${name}.conf":
ensure => file,
owner => 0,
group => 0,
mode => "0644",
content => " server $url;\n",
}
}
}
# manifests/nodes.pp
node 'nginx-01.chicago.il.private.test.clpbrd.com' {
include base, nginx, nginx::clipboard
$upstream = 'node'
nginx::clipboard::clipboard-http { "http":
sitename => "${hostname}.${publicdomain}",
upstream => $upstream,
}
nginx::clipboard::clipboard-https { "https":
sitename => "${hostname}.${publicdomain}",
upstream => $upstream,
}
nginx::clipboard::upstream { "upstream":
upstream => $upstream,
}
package { "git-core":
ensure => present,
}
vcsrepo { "/usr/src/clipboard-release":
ensure => present,
provider => git,
source => "[email protected]:clipboard/release.git",
require => Package["git-core"],
}
}
node 'node-01.chicago.il.private.test.clpbrd.com' {
include base, nodejs
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment