Skip to content

Instantly share code, notes, and snippets.

@Zordrak
Forked from anonymous/cmd_line
Last active August 29, 2015 14:14
Show Gist options
  • Save Zordrak/9eb605a96c23c4f6f3ca to your computer and use it in GitHub Desktop.
Save Zordrak/9eb605a96c23c4f6f3ca to your computer and use it in GitHub Desktop.
clubs_host/
β”œβ”€β”€ files
β”‚ β”œβ”€β”€ jsonevent-layout-1.6-jar-with-dependencies.jar
β”‚ β”œβ”€β”€ log4j.properties
β”‚ └── README.markdown
β”œβ”€β”€ lib
β”‚ └── puppet
β”‚ β”œβ”€β”€ facter
β”‚ β”‚ └── README.markdown
β”‚ β”œβ”€β”€ parser
β”‚ β”‚ └── functions
β”‚ β”‚ └── README.markdown
β”‚ β”œβ”€β”€ provider
β”‚ β”‚ └── README.markdown
β”‚ └── type
β”‚ └── README.markdown
β”œβ”€β”€ 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
β”œβ”€β”€ masterless
β”‚ β”œβ”€β”€ enc.sh
β”‚ β”œβ”€β”€ foo.yaml
β”‚ └── README.md
β”œβ”€β”€ metadata.json
β”œβ”€β”€ Modulefile
β”œβ”€β”€ README.md
β”œβ”€β”€ spec
β”‚ β”œβ”€β”€ README.markdown
β”‚ β”œβ”€β”€ spec_helper.rb
β”‚ β”œβ”€β”€ spec.opts
β”‚ └── unit
β”‚ └── puppet
β”‚ β”œβ”€β”€ provider
β”‚ β”‚ └── README.markdown
β”‚ └── type
β”‚ └── README.markdown
β”œβ”€β”€ templates
β”‚ └── README.markdown
└── tests
└── init.pp
# echo -e "\n$(pwd)\n"; puppet apply --modulepath ../../../modules --node_terminus exec --external_nodes $(pwd)/enc.sh ../manifests/init.pp --certname foo --test --noop
/root/puppet-devel/puppet/modules/clubs_host/masterless
Warning: Setting config_version is deprecated in puppet.conf. See http://links.puppetlabs.com/env-settings-deprecations
(at /usr/lib/ruby/site_ruby/1.8/puppet/settings.rb:1141:in `issue_deprecation_warning')
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Error: Could not find class clubs_host::params for foo on node foo
Error: Could not find class clubs_host::params for foo on node foo
# echo -e "\n$(pwd)\n"; puppet apply --modulepath /root/puppet-devel/puppet/modules --node_terminus exec --external_nodes /root/puppet-devel/masterless/enc.sh /root/puppet-devel/puppet/modules/clubs_host/manifests/init.pp --certname foo --test --noop
/root/puppet-devel/masterless
Warning: Setting config_version is deprecated in puppet.conf. See http://links.puppetlabs.com/env-settings-deprecations
(at /usr/lib/ruby/site_ruby/1.8/puppet/settings.rb:1141:in `issue_deprecation_warning')
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Info: Loading facts
Error: Could not find class clubs_host::params for foo on node foo
Error: Could not find class clubs_host::params for foo on node foo
#!/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': }
}
}
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