Skip to content

Instantly share code, notes, and snippets.

View llowder's full-sized avatar

Lee Lowder llowder

View GitHub Profile
define case_test::foo {
notify {"My name is '$title'": }
}
# puppet apply test.pp
Notice: Compiled catalog for pe-332-master.puppetdebug.vlan in environment production in 0.11 seconds
Notice: in hyphen test
Notice: /Stage[main]/Hyphentest/Notify[in hyphen test]/message: defined 'message' as 'in hyphen test'
Notice: /Stage[main]/Hyphentest/Exec[foo-bar]/returns: executed successfully
Notice: /Stage[main]/Hyphentest/Exec[foo bar]/returns: executed successfully
Notice: /Stage[main]/Hyphentest/Exec[foo]/returns: executed successfully
Notice: hyphen tester
Notice: /Stage[main]/Hyphen_-_tester/Notify[hyphen tester]/message: defined 'message' as 'hyphen tester'
Notice: hyphen-test::foo-bar
# find / -name "*.pp" -exec awk '/^class [a-zA-Z]/ {mypath = FILENAME; if ($2 ~ /\(/ || $3 == "(") { do if (getline) { if ($1 !~ /\)/ && $1 ~ /^\$/) { myparam = $1; sub( /^\/.*\/modules\//, "", mypath); sub( /\/manifests\//, "/", mypath ); sub( /\.pp/, "", mypath); if ( mypath ~ /\/init/ ) {sub( /\/init/, "", mypath)}gsub( /\//, "::", mypath); sub(/\$/, "", myparam); sub( /,.*/, "", myparam); print ("$" mypath "::" myparam)}} while($0 !~ /\)/)}}' {} \;
$postgresql::contrib::package_name
$postgresql::contrib::package_ensure
$postgresql::params::version
$postgresql::params::manage_package_repo
$postgresql::params::package_source
$postgresql::params::locale
$postgresql::params::charset
$postgresql::params::custom_datadir
$postgresql::params::custom_confdir
instance var1 is '<%= @var1 %>'
scope var1 is '<%= scope['var1'] %>'
scope.lookup var1 is '<%= scope.lookupvar('var1') %>'
scope.lookup client::var1 is '<%= scope.lookupvar('client::var1') %>'
scope.lookup client::service::var1 is '<%= scope.lookupvar('client::service::var1') %>'
scope.lookup client::params::var1 is '<%= scope.lookupvar('client::params::var1') %>'
### Keybase proof
I hereby claim:
* I am llowder on github.
* I am friedbob (https://keybase.io/friedbob) on keybase.
* I have a public key whose fingerprint is 1CE5 3FF2 12B0 2029 CB7F 8F26 71D8 6CDD AFE3 4344
To claim this, I am signing this object:
Info: Applying configuration version '1412175373'
Notice: /Stage[main]/Postgresql::Server::Config/Concat[/var/lib/pgsql/data/pg_hba.conf]/Exec[concat_/var/lib/pgsql/data/pg_hba.conf]/returns: The fragments directory is empty, cowardly refusing to make empty config files
Error: /var/opt/lib/pe-puppet/concat/bin/concatfragments.sh -o "/var/opt/lib/pe-puppet/concat/_var_lib_pgsql_data_pg_hba.conf/fragments.concat.out" -d "/var/opt/lib/pe-puppet/concat/_var_lib_pgsql_data_pg_hba.conf" -w '# This file is managed by Puppet. DO NOT EDIT.' returned 1 instead of one of [0]
Error: /Stage[main]/Postgresql::Server::Config/Concat[/var/lib/pgsql/data/pg_hba.conf]/Exec[concat_/var/lib/pgsql/data/pg_hba.conf]/returns: change from notrun to 0 failed: /var/opt/lib/pe-puppet/concat/bin/concatfragments.sh -o "/var/opt/lib/pe-puppet/concat/_var_lib_pgsql_data_pg_hba.conf/fragments.concat.out" -d "/var/opt/lib/pe-puppet/concat/_var_lib_pgsql_data_pg_hba.conf" -w '# This file is managed by Puppet. DO NOT EDIT.' returned 1 instead o
class mymodule::my_vhost_klass{
$my_urls = ['www.example.com', 'www2.example.com']
mymodule::my_vhosts_define{ $my_urls: }
}
nREPL server started on port 55161 on host 127.0.0.1 - nrepl://127.0.0.1:55161
Exception in thread "nREPL-worker-0" REPL-y 0.3.2, nREPL 0.2.0-beta5NoSuchMethod
Error clojure.tools.nrepl.StdOutBuffer.length()I clojure.tools.nrepl.middleware
.session/session-out/fn--7630 (session.clj:43)NoSuchMethodError clojure.tools.nr
epl.StdOutBuffer.length()I clojure.tools.nrepl.middleware.session/session-out/f
n--7630 (session.clj:43)java.lang.NoSuchMethodError: clojure.tools.nrepl.StdOutB
uffer.length()I
at clojure.tools.nrepl.middleware.session$session_out$fn__7630.doInvoke(
session.clj:43)
#<Namespace user>
file {
'some_directory':
ensure => directory,
owner => 'some_user',
group => 'some_user',
mode => '0644',
recurse => true,
source => 'puppet::///modules/my_module/some_directory'
}
class foo (
$param1 = 'something'
$param2 = 'otherthing'
#...
$paramN = 'thingN' # note that 'N' is aplaceholder for a number in this case
) {
file {
'common_base':
ensure => directory,
path => '/path/to/directory',