Don't install puppet on apply_prep
Closed this issue · 1 comments
Use Case
I feel it is a bit much to install puppet on a target, when it is not clear and obvious from the name that it will happen.
Describe the Solution You Would Like
I think having a parameter to the function to disable installing puppet if it is not already installed would be good.
I think it would be pretty easy to do, maybe just add a bit here https://github.com/puppetlabs/bolt/blob/main/bolt-modules/boltlib/lib/puppet/functions/apply_prep.rb#L101C52-L101C52
Something like targets.partition { |target| agent?(target) && wants_puppet?(target) }
.
I guess having that parameter set to true by default would keep backwards compatibility.
You can configure apply prep to do whatever you want with the puppet-library hook https://www.puppet.com/docs/bolt/latest/writing_plugins.html#puppet-library-plugins
If you simply dont want the agent install to run you can set the puppet-agent
feature on a target.
Those options are the correct way to control agent installation.