Created
February 12, 2013 22:37
-
-
Save strobert/4774137 to your computer and use it in GitHub Desktop.
puppet calling_class/module_name with hiera
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
strobenet::test2::dropIPs: | |
- CLASSESmodulename |
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
strobenet::test2::dropIPs: | |
- GLOBALfallback |
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
Notice: calling_class1: | |
Notice: /Stage[main]/Strobenet::Test2/Notify[calling_class1: ]/message: defined 'message' as 'calling_class1: ' | |
Notice: calling_class3: %{calling_class} | |
Notice: /Stage[main]/Strobenet::Test2/Notify[calling_class3: %{calling_class}]/message: defined 'message' as 'calling_class3: %{calling_class}' | |
Notice: dropIPs: GLOBALfallback | |
Notice: /Stage[main]/Strobenet::Test2/Notify[dropIPs: GLOBALfallback]/message: defined 'message' as 'dropIPs: GLOBALfallback' | |
Notice: d2: GLOBALfallback | |
Notice: /Stage[main]/Strobenet::Test2/Notify[d2: GLOBALfallback]/message: defined 'message' as 'd2: GLOBALfallback' | |
Notice: calling_class2: | |
Notice: /Stage[main]/Strobenet::Test2/Notify[calling_class2: ]/message: defined 'message' as 'calling_class2: ' | |
Notice: d3: strobenet | |
Notice: /Stage[main]/Strobenet::Test2/Notify[d3: strobenet]/message: defined 'message' as 'd3: strobenet' | |
Notice: calling_class4: %{::calling_class} | |
Notice: /Stage[main]/Strobenet::Test2/Notify[calling_class4: %{::calling_class}]/message: defined 'message' as 'calling_class4: %{::calling_class}' | |
Notice: Finished catalog run in 0.17 seconds |
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 strobenet::test2 ( | |
$loopbackIP, | |
$publicIP0, | |
$publicIP1, | |
$dropIPs = undef, | |
) { | |
# package { 'iptables': | |
# ensure => 'present', | |
# } | |
# | |
# service { 'iptables': | |
# ensure => running, | |
# enable => true, | |
# hasrestart => true, | |
# } | |
$d2 = hiera(strobenet::test2::dropIPs) | |
notify { "dropIPs: ${dropIPs}": } | |
notify { "d2: ${d2}": } | |
notify { "d3: ${module_name}": } | |
notify { "calling_class1: ${calling_class}": } | |
notify { "calling_class2: ${::calling_class}": } | |
notify { "calling_class3: %{calling_class}": } | |
notify { "calling_class4: %{::calling_class}": } | |
file { 'sysconfig-iptables': | |
ensure => file, | |
path => '/etc/sysconfig/iptables', | |
content => template('strobenet/sysconfig-iptables'), | |
# require => Package['iptables'], | |
# notify => Service['iptables'], | |
} | |
} |
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
strobenet::test2::dropIPs: | |
- modulename |
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
│#-A DROP-INPUT -s GLOBALfallback -j REJECT --reject-with icmp-host-prohibited |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment