Skip to content

Instantly share code, notes, and snippets.

@zipkid
Created May 21, 2012 13:12
Show Gist options
  • Save zipkid/2762249 to your computer and use it in GitHub Desktop.
Save zipkid/2762249 to your computer and use it in GitHub Desktop.
Chaining resources - locking / ordering
class ntp
{
# http://docs.puppetlabs.com/guides/language_guide.html#chaining-resources
# anchor is in https://github.com/puppetlabs/puppetlabs-stdlib
anchor { 'ntp::start': }->
class { 'ntp::package': }->
class { 'ntp::config': }~>
class { 'ntp::service': }->
anchor { 'ntp::end': }
# Replacing -> by ~> will also give you a notify of the second if the first changes
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment