puppetlabs / puppet_litmus

Providing a simple command line tool for puppet content creators, to enable simple and complex test deployments.
Apache License 2.0
88 stars 55 forks source link

Allow customising module used for installing Puppet agent #539

Open danielkza opened 6 months ago

danielkza commented 6 months ago

Use Case

I need to use a custom module to install puppet agents onto targets, as the operating systems I am working with don't have packages from PuppetLabs repositories at the moment.

Describe the Solution You Would Like

Allow a way to configure some module name instead of puppet_agent. It doesn't even need to change the usage, as the module can still be assumed to have a task named install.

Describe Alternatives You've Considered

I'm trying to hack around a custom way to provision the VMs created by provision, but simply pointing to a custom module would make life so much easier.

h0tw1r3 commented 2 months ago

There's nothing that forces you to run the litmus:install_agent task, so roll your own 😄 I typically handle edge cases like this by replacing the rake task with a custom one. Eg, instead of calling rake litmus:install_agent, rake litmus:my_install_agent.

You could start by coping the litmus:install_agent rake task into a custom rake file.

This is an example of adding rake tasks to the litmus namespace.