Ask Your Question
0

Define file array to be used in resource ordering

asked 2016-10-29 07:25:21 -0500

Hi,

Is there a way to group all the file resources together to allow them to be specified as one variable in the ordering?

eg.

 Package["$package_name"] -> File['$config_files'] -> Service["$service_name"]

Thanks

edit retag flag offensive close merge delete

Comments

1

I cant think of a way just with the puppet language. There are resource collectors https://docs.puppet.com/puppet/latest/reference/lang_collectors.html Does that solve your situation?

Kai Burghardt gravatar imageKai Burghardt ( 2016-10-29 11:43:57 -0500 )edit

I've never tried resource collectors with File. I'll give it a go. Thanks

cyborg_squared gravatar imagecyborg_squared ( 2016-10-29 12:09:47 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-10-31 08:16:24 -0500

pascal gravatar image

I am using tags and resource collectors for this:

on the file resources set the metaparameter 'tag':

  tag => "$service_config",

and then the ordering line should look like this

   Package["$package_name"] -> File<| tag ==  "$service_config" |>  -> Service["$service_name"]
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-10-29 07:25:21 -0500

Seen: 31 times

Last updated: Oct 31 '16