Created
August 20, 2014 21:30
-
-
Save awaxa/1567c384d590a2402b94 to your computer and use it in GitHub Desktop.
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 included { | |
file { '/tmp/testfile': | |
ensure => 'file', | |
} | |
} | |
class my::one { | |
File { | |
mode => '0440', | |
} | |
include included | |
} | |
class my::three { | |
File { | |
mode => '0660', | |
} | |
include included | |
} | |
class my::two { | |
File { | |
mode => '0400', | |
} | |
include included | |
} | |
include my::two | |
include my::one | |
include my::three | |
/* | |
Notice: Compiled catalog for greg.puppetlabs.vm in environment production in 0.09 seconds | |
Notice: /Stage[main]/Included/File[/tmp/testfile]/mode: mode changed '0644' to '0400' | |
Notice: Finished catalog run in 0.08 seconds | |
# ls -l /tmp/testfile | |
-r-------- 1 root root 0 Aug 20 21:16 /tmp/testfile | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://docs.puppetlabs.com/puppet/latest/reference/lang_defaults.html#behavior
"Although Puppet 3.x no longer does dynamic variable lookup, it still uses dynamic scope for resource defaults."