summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-04-26 17:01:46 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-04-26 17:01:46 +0000
commitbda8e52a02d77c39cd96ea02352c0067a57135e7 (patch)
tree0df220bd8c0d3cb6af86ba328eff14507ffffe38 /examples
parentbff94634075617339f65be15dc7eb3261db48f85 (diff)
downloadpuppet-bda8e52a02d77c39cd96ea02352c0067a57135e7.tar.gz
puppet-bda8e52a02d77c39cd96ea02352c0067a57135e7.tar.xz
puppet-bda8e52a02d77c39cd96ea02352c0067a57135e7.zip
This should have been in 0.16.1. Moving the "setclass" statements around so that classes are set before a given class's code is evaluated, so it can be tested within the code, within node defs, components, or classes.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1139 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'examples')
-rw-r--r--examples/code/snippets/tagged.pp10
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/code/snippets/tagged.pp b/examples/code/snippets/tagged.pp
index f4d6ff7ca..7d382d01c 100644
--- a/examples/code/snippets/tagged.pp
+++ b/examples/code/snippets/tagged.pp
@@ -3,6 +3,16 @@
tag testing
tag(funtest)
+define tagdefine {
+ $path = tagged(tagdefine) ? {
+ true => "true", false => "false"
+ }
+
+ file { "/tmp/taggeddefine$path": ensure => file }
+}
+
+tagdefine {}
+
$yayness = tagged(yayness) ? {
true => "true", false => "false"
}