summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-05-09 06:01:04 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-05-09 06:01:04 +0000
commit9e77e7a95c1c59aca2e7599e0164aef8f3724bf2 (patch)
treea0c1931d86c796bfeb74d665e225420f1676507c /examples
parent513b87a86e9b77bb9f1b011aa55222ce9cfb3a8d (diff)
downloadpuppet-9e77e7a95c1c59aca2e7599e0164aef8f3724bf2.tar.gz
puppet-9e77e7a95c1c59aca2e7599e0164aef8f3724bf2.tar.xz
puppet-9e77e7a95c1c59aca2e7599e0164aef8f3724bf2.zip
It is just a snippet test, and thus a functional test but not a coverage test, but definition overrides officially work. This was important because it enables definitions to be collectable, which was not possible without the mechanism that enables this.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1181 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'examples')
-rw-r--r--examples/code/snippets/defineoverrides.pp17
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/code/snippets/defineoverrides.pp b/examples/code/snippets/defineoverrides.pp
new file mode 100644
index 000000000..ff598eb69
--- /dev/null
+++ b/examples/code/snippets/defineoverrides.pp
@@ -0,0 +1,17 @@
+# $Id$
+
+$file = "/tmp/defineoverrides1"
+
+define myfile(mode) {
+ file { $name: ensure => file, mode => $mode }
+}
+
+class base {
+ myfile { $file: mode => 644 }
+}
+
+class sub inherits base {
+ myfile { $file: mode => 755 }
+}
+
+include sub