summaryrefslogtreecommitdiffstats
path: root/examples/code
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2005-08-29 21:03:46 +0000
committerLuke Kanies <luke@madstop.com>2005-08-29 21:03:46 +0000
commit914764b9d5045fb9a1824577546ca0559d2a1e88 (patch)
tree239011e6286208a5b074a73bb04c52fc3db67f5b /examples/code
parenteab73144798bb66118501ba1d26cbac5a4e86bae (diff)
downloadpuppet-914764b9d5045fb9a1824577546ca0559d2a1e88.tar.gz
puppet-914764b9d5045fb9a1824577546ca0559d2a1e88.tar.xz
puppet-914764b9d5045fb9a1824577546ca0559d2a1e88.zip
As Christian requested, I am no longer downcasing facts I receive from Facter. Also, removing some outdated files
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@599 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'examples/code')
-rw-r--r--examples/code/facts22
-rw-r--r--examples/code/iftest21
-rw-r--r--examples/code/selectors10
3 files changed, 5 insertions, 48 deletions
diff --git a/examples/code/facts b/examples/code/facts
deleted file mode 100644
index fcfec2c0d..000000000
--- a/examples/code/facts
+++ /dev/null
@@ -1,22 +0,0 @@
-# $Id$
-
-# DISABLED
-
-# facts are now added to the top scope (e.g., operatingsystem and macaddress)
-
-# these facts have to get defined by the server onto the client before
-# we can retrieve their values
-#fact { "videocard":
-# interpreter => "/bin/sh",
-# code => "lspci | grep VGA",
-# os => "Linux"
-#}
-$testing = "value"
-$operatingsystem = fact("operatingsystem")
-$fact = addfact(
- name => "videocard",
- interpreter => "/bin/sh",
- code => "lspci | grep VGA",
- os => "Linux"
-)
-$card = fact("videocard")
diff --git a/examples/code/iftest b/examples/code/iftest
deleted file mode 100644
index bc9d9cff1..000000000
--- a/examples/code/iftest
+++ /dev/null
@@ -1,21 +0,0 @@
-# $Id$
-$variable = "value"
-
-$cooltest = $variable ? {
- other => yayness,
- value => goodtest
-}
-
-if $variable == "other" {
- $cooltest = "yayness"
- $platform = $operatingsystem
-} elsif $variable == "value" {
- $cooltest = "goodtest"
- $platform = $operatingsystem
-} else {
- $goodness = $operatingsystemrelease
-}
-
-if "value" == "value" {
- $booyah = "value"
-}
diff --git a/examples/code/selectors b/examples/code/selectors
index 1efd8123a..a70399bc7 100644
--- a/examples/code/selectors
+++ b/examples/code/selectors
@@ -1,11 +1,11 @@
# $Id$
#
-$platform = sunos
+$platform = SunOS
$funtest = $platform ? {
- sunos => yayness,
- aix => goodness,
+ SunOS => yayness,
+ AIX => goodness,
default => badness
}
@@ -15,10 +15,10 @@ $filename = "/tmp/yayness"
$sleeper = file { $filename:
mode => $platform ? {
- sunos => 644,
+ SunOS => 644,
default => 755
},
- create => $platform ? sunos => true
+ create => $platform ? "SunOS" => true
}
# i guess it has to be solved this way...