☛ September 7, 2013 ❝The Puppet Show — Quick bonding of resources❞
Categorized devops ≀ Tagged how.to puppet
To avoid modelling simple dependencies between resources using the somewhat tedious and chatty require and notify attributes,
the ->
and ~>
operators can help.
They are applicable to any resources that are by nature closely related and thus defined in the same file anyway.
A typical example is a group and a user belonging to it:
You can chain more users belonging to the same group by appending another … -> user {…}
construct.
For update notification relationships, ~>
does the same thing.