Skip to content

Instantly share code, notes, and snippets.

View lindenle's full-sized avatar
🎯
Focusing

Alex Linden Levy lindenle

🎯
Focusing
View GitHub Profile
# This file managed by PUPPET
[global]
vardir = /var/lib/puppetdb
logging-config = /var/lib/puppetdb/log4j.properties
resource-query-limit = 20000
[database]
classname = org.postgresql.Driver
subprotocol = postgresql
subname = //localhost:5432/puppetdb
@lindenle
lindenle / gist:3921393
Created October 20, 2012 00:15
puppet parser validate issue
=>> cat /tmp/foo.pp
node "foo" {
class { "bar" }
}
=>> puppet parser validate --color=false /tmp/foo.pp
err: Could not parse for environment production: Syntax error at '}'; expected '}' at /tmp/foo.pp:2
err: Try 'puppet help parser validate' for usage
=>> echo $?
node "test" {
class { "stdlib": stage => setup}
file_line { "foo":
path => "/tmp/foo.txt",
match => "/^monkey.*$/",
line => "monkey,doggy",
}
}
@lindenle
lindenle / gist:4756005
Last active December 12, 2015 09:59
puppet range inline
in command line:
puppet apply -e '$a=inline_template("<%= (1..10).step(2).to_a -%>") notify { "$a" : }'
in node:
$odd_ch=inline_template("<%= (1..71).step(2).to_a -%>")
Error:
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class stdlib at /puppet/nodes/qa/manifests/base.d/base.pp:25 on node node
Environment setup:
client - puppet.conf
environment = qa_5_2_0
master - puppet.conf
=>> puppet master --debug --verbose --environment=qa_5_2_0 --compile node
class { "stdlib": }
# Class: stdlib
#
# This module manages stdlib. Most of stdlib's features are automatically
# loaded by Puppet, but this class should be declared in order to use the
# standardized run stages.
#
# Parameters: none
#
# Actions:
#
2013-02-14 19:45:15,388 ERROR [BrokerService[localhost] Task-2503] [cursors.AbstractStoreCursor] QueueStorePrefetch121059727 - Failed to fill batch
java.io.IOException: Invalid location: 1358:30094100, : java.lang.NegativeArraySizeException
at org.apache.kahadb.journal.DataFileAccessor.readRecord(DataFileAccessor.java:94)
at org.apache.kahadb.journal.Journal.read(Journal.java:601)
at org.apache.activemq.store.kahadb.MessageDatabase.load(MessageDatabase.java:817)
at org.apache.activemq.store.kahadb.KahaDBStore.loadMessage(KahaDBStore.java:955)
at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore$5.execute(KahaDBStore.java:493)
at org.apache.kahadb.page.Transaction.execute(Transaction.java:728)
at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.recoverNextMessages(KahaDBStore.java:485)
at org.apache.activemq.store.ProxyMessageStore.recoverNextMessages(ProxyMessageStore.java:88)
Unable to initialize SMTP properly. Check config and use --smtp-debug. VALUES: xxxxxx
at /usr/local/Cellar/git/1.8.3.1/libexec/git-core/git-send-email line 1224.