puppet-generate-puppetfile icon indicating copy to clipboard operation
puppet-generate-puppetfile copied to clipboard

add an option to block a module

Open vchepkov opened this issue 8 years ago • 7 comments
trafficstars

It would be convenient if there was some option to blacklist a module or freeze module to a certain version.

For instance, if you have only Redhat based servers, there is no reason to install puppetlabs/apt or gentoo/portage. 'freeze' a version also can be handy, for example, keep puppetlabs/firewall at version 1.8.1, since 1.8.2 doesn't properly handle IPv6.

vchepkov avatar Mar 11 '17 20:03 vchepkov

Can you describe how you would imagine implementing such configuration options? What you'd expect a config file might look like, for instance.

rnelson0 avatar Mar 11 '17 20:03 rnelson0

What if there was a configuration file Puppetfile.gen, for example:

mod 'puppetlabs/firewall', '1.8.1'
mod 'puppetlabs/apt', '0'
mod 'gentoo/portage', '0'

vchepkov avatar Mar 11 '17 22:03 vchepkov

What about a YAML config? (parsing freeform text just seems fragile)

---
freeze:
  puppetlabs/firewall: '1.8.1'
ignore:
- puppetlabs/apt

rnelson0 avatar Mar 15 '17 15:03 rnelson0

Even better

vchepkov avatar Mar 15 '17 22:03 vchepkov

How about command line options? For example:

-r/--raw firewall -x/--exclude apt

Where raw modules are left as-is (e.g. as per input Puppetfile) and excluded modules are never included in the output Puppetfile. Specify option multiple times for multiple modules.

This approach would mean we won't need to invent and deal with another file format.

earsdown avatar Jan 07 '18 06:01 earsdown

I suppose a script with very long command line can be used instead of config file, but it's less convenient and you are subject of ARG_MAX limitations, albeit lengthy

vchepkov avatar Jan 07 '18 13:01 vchepkov

Changed the title to use better terminology.

rnelson0 avatar Jul 03 '20 04:07 rnelson0