Reputation: 19830
I would like to reuse same recipe multiple times. For example I have a recipe to install certificate on Windows machine (download it, put in in proper store, ...). But depends on machine/role I would like to run it only for X certificates.
I am using full chef infrastructure.
Upvotes: 0
Views: 440
Reputation: 37580
Chef two another concepts that fit this task better than recipes do:
remote_file
, execute
, etc) to one new resource. Probably the right thing for you.As suggested by Sebastian, you can still iterate over a data bag in a recipe. Although this is true, the cleaner way to group the tasks download it, put in in proper store, ... would be a definition or library.
Upvotes: 2