Yes to all of the above :-) 1) Within Apply blocks, you can leverage Hiera data from the module. Simply put a hiera.yaml in the root of the module to define where Hiera data should be read from
2) While Hiera is nice, it might be even more powerful (depending on the use case) to leverage the new capabilities in the v2 Bolt inventory file to define facts and/or variables for groups and/or nodes: https://puppet.com/docs/bolt/latest/inventory_file_v2.html#inventory-facts-vars-features-v2 You can then use this data directly in your plans: https://puppet.com/docs/bolt/latest/writing_plans.html#variables-and-facts-on-targets -Kevin On Tuesday, September 17, 2019 at 6:32:58 PM UTC+2, Andy Hall wrote: > > This works great thanks very much for your help. I just had to add the > location param to the plan itself as follows: > > plan profiles::puppet_upgrade( > TargetSpec $servers, > String $location, > ) { > > It works perfectly !! Could I ask if the params can be read from a file > similar to hiera (or an inventory in ansible) rather than being passed on > the command line ? If bolt can do that then I'd never write another > playbook again :-) > -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/deee3a3b-3011-4e0b-a7eb-3d2dc5b2fdfc%40googlegroups.com.