On Friday, January 31, 2014 1:40:38 PM UTC+1, Stack Kororā wrote:
>
> Huh. I don't know why, but for some silly reason I thought I had to use
> subclasses with arrows. I will re-work my script with them and see how it
> goes.
>
Hi,
I'll add that chaining arrows between single resources can quickly become
cumbersome when the number of resources starts increasing (more files, more
packages…).
I worked around this by using tags and resource collectors.
You can set tags as default attributes for the resource types you are
using, e.g.:
Package {
tag => "my-packages",
}
File {
tag => "my-files",
}
Service {
tag => "my-services",
}
And then you can use resource collectors to define dependencies between
your tagged types:
Package <| tag == "my-packages" |>
->
File <| tag == "my-files" |>
~>
Service <| tag == "my-services" |>
(Writing dependencies on separate lines makes them easier to read and
understand IMHO)
--
Marco
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/10314e76-7ffa-4e59-9b4c-9ca4167230ce%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.