Skip to content

Instantly share code, notes, and snippets.

@glarizza
Created February 1, 2012 20:22
Show Gist options
  • Select an option

  • Save glarizza/1719086 to your computer and use it in GitHub Desktop.

Select an option

Save glarizza/1719086 to your computer and use it in GitHub Desktop.
Include Order
## 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