This file contains 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
umm, gist is awesome! |
This file contains 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 x{ | |
file { '/tmp/dan': | |
ensure => file, | |
mode => $mode | |
} | |
} | |
class y { | |
include x | |
File { content => 'y'} |
This file contains 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 a { | |
Notify { | |
message => 'a', | |
} | |
exec {'/bin/echo a': | |
logoutput => true, | |
} | |
} |
This file contains 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
stage{'before':}->Stage['main'] | |
include f | |
class f { | |
# include b | |
notify{'after':} | |
} | |
class b { | |
notify{a:} | |
notify{e:} |
This file contains 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 abc( | |
$a = $myparams::foo | |
) inherits myparams { | |
notify{$a:} | |
} | |
class myparams { | |
$foo = 'blah' | |
} |
This file contains 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
def exists? | |
begin | |
nova_manage("network", "list").match(/^#{resource[:network]}\/[0-9]{1,2} /) | |
rescue Exception | |
return false | |
end | |
end |
This file contains 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
describe 'rabbitmq::plugins', :type => :define do | |
let(:module_path) { "#{File.dirname(__FILE__)}/../../../../" } | |
let(:title) { 'foo' } | |
describe 'default behaviors' do | |
let(:params) { {} } | |
let(:facts) { {'puppetversion' => '1.2.3'} } | |
it { should create_resource('package', 'rabbitmq-server').with_param('ensure', 'absent') } | |
end | |
end |
This file contains 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
path / | |
auth yes | |
allow * |
This file contains 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
facts = Puppet::Rails::InventoryFact.find_by_sql(["SELECT inventory_facts.value, inventory_nodes.name AS node_name | |
FROM inventory_facts INNER JOIN inventory_nodes | |
ON inventory_facts.node_id = inventory_nodes.id | |
WHERE inventory_facts.name = ?", name]) |
This file contains 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
$rand = inline_template("<%= (0...8).map{65.+(rand(25)).chr}.join %>") | |
notice($rand) | |
file { '/tmp/foo': | |
replace => false, | |
content => $rand | |
} | |
OlderNewer