-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure module installation path via Puppetfile #156
Comments
Is there a reason why the I tend to think of a Puppetfile like a Gemspec - its domain is to tell you what needs to be installed - but it doesn't know ultimately where they will go - that is the responsibility of the gem installer. If path information were added to Puppetfile, it would make it non-portable. In other words, I could not reasonably expect to take your Puppetfile and run it on my machine unmodified. you could have put |
In that case I would have to instruct every co-worker about the extra flag they have to add when installing puppet modules. Of course I could write that down somewhere (and get lost, or forgotten), make something like a make script... OR have it stored as configuration in the Puppetfile inside the project. I would prefer the last.
I not very familiar with ruby and related tools. But I tend to look at it similar to Composer (PHP package manager). They also store the path in the configuration file (vendor-dir). An other tool, Bower (Frontend package manager) allows you to store the path in a seperate file (bower.rc) inside the project.
Saving it as configuration inside the project makes is very portable the way I see it. Take my first argument against the --path parameter. My co-workers can check the project out and run |
I guess this is more of a philosophical point than a technical one: Perhaps having the configuration option in # Saved in your project as .librarian/puppet/config
---
LIBRARIAN_PUPPET_DESTRUCTIVE: "false"
LIBRARIAN_PUPPET_PATH: "puppet/vendor/modules"
# Other config options follow the same pattern. LIBRARIAN_PUPPET_<NAME>=<VALUE> As another alternative, are you familiar with r10k? It's another project which does something very similar to librarian-puppet. It uses an external file r10k.yaml to tell the program which paths to install modules. If the above work-around does not accommodate your use-case, maybe r10k will? |
I didn't know about |
Just like The first time you run |
Puppet supports multiple module paths. It would be nice if you could instruct Librarian-puppet to install to a specific module directory. @rodjek opted against this in earlier issues (#9 and #120), but I would like the current maintainers to reconsider.
My use case would be:
Have librarian-puppet install to
modules/vendor
and have my own modules inmodules/src
. This allows you to have some custom modules without having to separating them in separate repositories and having them to pull in with librarian-puppet.In case someone uses Vagrant, you can simply configure both module paths like this:
The text was updated successfully, but these errors were encountered: