Created
February 1, 2012 20:22
-
-
Save glarizza/1719086 to your computer and use it in GitHub Desktop.
Include Order
This file contains hidden or 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
| ## This works | |
| class separate($foo = 'bar') { | |
| file { '/tmp/foo': | |
| ensure => file, | |
| content => 'First Level', | |
| } | |
| } | |
| class different inherits separate { | |
| File['/tmp/foo'] { | |
| content => 'different', | |
| } | |
| } | |
| class inheritance::sub inherits different { | |
| File['/tmp/foo'] { | |
| content => 'inheritance::sub', | |
| } | |
| } | |
| class { 'separate': | |
| foo => 'baz', | |
| } | |
| include separate | |
| ## This doesn't | |
| class separate($foo = 'bar') { | |
| file { '/tmp/foo': | |
| ensure => file, | |
| content => 'First Level', | |
| } | |
| } | |
| class different inherits separate { | |
| File['/tmp/foo'] { | |
| content => 'different', | |
| } | |
| } | |
| class inheritance::sub inherits different { | |
| File['/tmp/foo'] { | |
| content => 'inheritance::sub', | |
| } | |
| } | |
| include separate | |
| class { 'separate': | |
| foo => 'baz', | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment