This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class parent1 { | |
include child1 | |
anchor { 'parent1::start': } -> | |
Class['child1'] -> | |
anchor { 'parent1'::end': } | |
} | |
class parent2 { | |
include child2 | |
anchor { 'parent2::start': } -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
parent::params: | |
- example1 | |
- example2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Notice: Scope(Class[main]): String | |
Notice: Compiled catalog for stout.4c in environment production in 0.03 seconds | |
Notice: Finished catalog run in 0.02 seconds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$hosts = ['hosta','hostb','hostc'] | |
range(0,count($hosts)-1).each |$num| { | |
$port = 8080 + $num | |
somemodule::someservice { $hosts[$num]: | |
listening_port => $port, | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
supercow@stout:~$ puppet apply /tmp/test.pp | |
Notice: Compiled catalog for stout.4c in environment production in 0.05 seconds | |
Notice: /Stage[main]//Ssh_authorized_key[supercow@doppelbock]/ensure: current_value absent, should be present (noop) | |
Notice: /Stage[main]//Ssh_authorized_key[supercow@Kriek]/ensure: current_value absent, should be present (noop) | |
Notice: /Stage[main]//Ssh_authorized_key[supercow@stout]/ensure: current_value absent, should be present (noop) | |
Notice: Class[Main]: Would have triggered 'refresh' from 3 events | |
Notice: Stage[main]: Would have triggered 'refresh' from 1 events | |
Notice: Finished catalog run in 0.03 seconds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if File.exists?('/tmp/test') | |
Facter.add('test_content') do | |
setcode do | |
File.read('/tmp/test') | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$req = [System.Net.WebRequest]::Create('https://master:8140/production/certificate_status/certname_to_rm') | |
$req.Method = "DELETE" | |
$req.Accept = "pson" | |
$req.ContentLength = 0 | |
# ignore ssl checks | |
$ssl_check = [System.Net.ServicePointManager]::ServerCertificateValidationCallback | |
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} | |
$req.GetResponse() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl -k -X DELETE -H "Accept: pson" https://master:8140/production/certificate_status/certname_to_rm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ! $::package_installed { | |
file { 'download_rpm': | |
ensure => file, | |
path => '/tmp/my_package.rpm', | |
source => 'puppet:///files/my_package.rpm', | |
} | |
exec { 'install_package': | |
command => '/bin/rpm -i /tmp/my_package.rpm', | |
require => File['download_rpm'], | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__git_ps1_unfucker() { | |
unalias -a | |
__git_ps1 "$@" | |
} | |
# ... SNIP ... | |
PS1_git='\[\033[01;37m\]$(__git_ps1_unfucker " (%s)")' | |
PS1="${PS1_user}${PS1_at}${PS1_host}${PS1_colon}${PS1_pwd}${PS1_git}${PS1_shell}" |