Skip to content

Instantly share code, notes, and snippets.

if 'false' {
notify { 'foo': }
}
[root@master2 ntp]# puppet apply foo.pp
Notice: Compiled catalog for master2 in environment production in 0.05 seconds
Notice: foo
Notice: /Stage[main]//Notify[foo]/message: defined 'message' as 'foo'
Notice: Finished catalog run in 0.40 seconds
[root@master2 ntp]# cat foo.pp
class { 'ntp': foo => false }
include ntp
[root@master2 ntp]# puppet apply foo.pp
Notice: Compiled catalog for master2 in environment production in 1.28 seconds
Notice: Finished catalog run in 0.89 seconds
[root@master2 ntp]# vi foo.pp
[root@master2 ntp]# cat foo.pp
include ntp
@fiddyspence
fiddyspence / gist:9048311
Created February 17, 2014 10:36
contain with a parameterised class
[root@master2 ~]# puppet apply foo.pp
Notice: Compiled catalog for master2 in environment production in 0.24 seconds
Notice: sdkjfbkjsbd
Notice: /Stage[main]/Bar/Notify[sdkjfbkjsbd]/message: defined 'message' as 'sdkjfbkjsbd'
Notice: /Stage[main]/Foo/File[/tmp/file]/ensure: defined content as '{md5}d111ae55ded9fb2cd63c590d1d0b1b30'
Notice: Finished catalog run in 0.46 seconds
[root@master2 ~]# cat foo.pp
class foo ($content) {
file{ '/tmp/file':
content => $content,
@fiddyspence
fiddyspence / gist:9066985
Last active August 29, 2015 13:56
Declaration
class foo {
notify { 'foo': }
}
# this will be fine
include foo
include foo
include foo
include foo
http://projects.puppetlabs.com/issues/8040
http://www.devco.net/archives/2012/12/13/simple-puppet-module-structure-redux.php
class foo ( $docroot ) {
validate_absolute_path($docroot)
class { '::mysql::server':
root_password => 'strongpassword',
The Atlassian terms allow companies to access 1-to-1 chat history (for future chats, not retroactively). The Atlassian Privacy Policy also removes a HipChat restriction that has caused a lot of confusion for business customers. Under HipChat's support documentation (which is referenced in the HipChat privacy policy), HipChat administrators cannot view other users' 1-to-1 chat history or the files that were shared. In many cases, this is inconsistent with an employer's policy about employee communications occurring in the workplace, which employers typically have the right to access. Under the Atlassian Privacy Policy, HipChat administrators will have the right to access all information in the HipChat accounts they manage, including 1-to-1 chat history and files shared in those 1-to-1 chats. The HipChat Specific Terms require customers (e.g. the account holder) to secure all required consents from users to allow for this level of access. Note that this change does not apply retroactively; 1-to-1 chats occurrin
spenceware:~ fids$ irb
irb(main):001:0> 'www.foo' =~ /^www.*/
=> 0
ruby 1.9.3p448 (2013-06-27) [i386-mingw32]
C:\Program Files (x86)\Puppet Labs\Puppet\bin>facter domain
Could not retrieve domain: undefined method `gsub' for nil:NilClass
The system cannot find the path specified.
The system cannot find the path specified.
Using Facter::Util::Resolution.exec with a shell built-in is deprecated. Most bu
ilt-ins can be replaced with native ruby commands. If you really have to run a b
uilt-in, pass "cmd /c your_builtin" as a command (command responsible for this m
essage was "dnsdomainname 2> /dev/null")
class thing {
create_resources (foo,{})
create_resources (bar,{})
Foo <| tag == 'thing' |> -> Bar <| tag == 'thing' |>
}
function ssh {
while true ; do
/usr/bin/ssh -A $*
if [ $? == '0' ]; then
break
fi
sleep 1
done
}