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
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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