Last active
March 27, 2018 20:17
-
-
Save binford2k/ff402125f4a9782dd3ee1a5c3cc63239 to your computer and use it in GitHub Desktop.
https://validate.puppet.com/load/https://gist.github.com/binford2k/ff402125f4a9782dd3ee1a5c3cc63239
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
# Press the 'show relationships' button | |
# to see how these classes relate to one another | |
class outside { | |
include floater # this class is uncontained, so it will "float" outside the graph | |
contain contained # this class is contained, so it will be enforced within the parent class | |
require required # this class is required, so all we know is that it will be enforced before the parent class | |
} | |
class floater { | |
file { '/tmp/foo': | |
ensure => file, | |
before => Notify['floater'], | |
} | |
notify { 'floater': } | |
} | |
class contained { | |
file { '/tmp/bar': | |
ensure => file, | |
before => Notify['contained'], | |
} | |
notify { 'contained': } | |
} | |
class required { | |
file { '/tmp/buz': | |
ensure => file, | |
before => Notify['required'], | |
} | |
notify { 'required': } | |
} | |
class anotherthing { | |
notify { 'hello there': | |
# notice that this relationship doesn't involve class required | |
require => Class['outside'], | |
} | |
} | |
# include the class in the rendered catalog | |
include outside | |
# include another class that has a dependency on outside | |
include anotherthing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment