Skip to content

Instantly share code, notes, and snippets.

Created February 5, 2015 10:20
Show Gist options
  • Save anonymous/4162d9371233763d5234 to your computer and use it in GitHub Desktop.
Save anonymous/4162d9371233763d5234 to your computer and use it in GitHub Desktop.
puppet masterless
puppet apply --modulepath ../../../modules --node_terminus exec --external_nodes $(pwd)/enc.sh ../manifests/init.pp --certname foo --test --noop
#!/bin/bash
exec cat ${1}.yaml
---
classes:
clubs_host:
clubs_host::params:
clubs:
admin: {}
httpd: true
lumberjack: false
tomcat: true
class clubs_host {
notify { "Loaded clubs_host": }
require 'clubs_host::install'
}
class clubs_host::install inherits ::clubs_host::params {
if $::clubs_host::params::lumberjack != false {
class { '::clubs_host::lumberjack::install': }
}
if $::clubs_host::params::httpd != false {
class { '::clubs_host::httpd::install': }
}
if $::clubs_host::params::tomcat != false {
class { '::clubs_host::tomcat::install': }
}
if $::clubs_host::params::db != false {
class { '::clubs_host::db::install': }
}
}
manifests/
├── db
│ └── install.pp
├── httpd
│ ├── config
│ │ └── clubs.pp
│ ├── config.pp
│ └── install.pp
├── init.pp
├── install.pp
├── lumberjack
│ └── install.pp
├── params.pp
└── tomcat
├── config
│ └── clubs.pp
├── config.pp
└── install.pp
class clubs_host::params (
$tomcat = false,
$httpd = false,
$db = false,
$lumberjack = true,
$logstash_hosts = ['<host>:6782'],
$clubs = { },
$httpd_package = 'httpd',
$tomcat_package = 'tomcat6',
$mysql_package = 'mysql55-server',
) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment