librarian-puppet icon indicating copy to clipboard operation
librarian-puppet copied to clipboard

Excepting module directories from librarian management

Open Aethylred opened this issue 12 years ago • 6 comments

I'm trying to implement something similar to the Roles and Profiles setup as described by @hunner (and an example ).

When running:

librarian-puppet --clean

it wipes the modules directories completely, removing the role and profile classes (say hooray for git reset --hard HEAD).

Could there be a flag on a module to make librarian-puppet leave it alone?

Something like:

ignore 'role'
ignore 'profile'

processing a list might work better:

ignore ['role','profile']

Aethylred avatar Oct 24 '13 01:10 Aethylred

The way I work around this is to have two module paths configured in puppet, one that has librarian-puppet managed modules and one that doesn't.

rodjek avatar Oct 24 '13 01:10 rodjek

or you can put your git modules into ./my_modules and use

mod 'mymodule', :path => "./my_modules/mymodule"

carlossg avatar Dec 10 '13 20:12 carlossg

I'm using two local module directories in my Puppetfile as @carlossg suggested. I bumped into the issue that dependencies via :path based modules were not fetched, but I fixed this in #184.

@rodjek or @carlossg can one of you make a new release of librarian-puppet?

ringods avatar Mar 12 '14 11:03 ringods

What ended up being the cleanest solution? I'm leaning toward a separate profiles repository, pulled in via librarian-puppet with the path option.

andyleejordan avatar Aug 30 '14 23:08 andyleejordan

until somebody implements a not-so-destructive clean goal, just put them in a different dir and use :path entries in Puppetfile

mod 'mymodule', :path => "./my_modules/mymodule"

carlossg avatar Sep 01 '14 09:09 carlossg

I would suggest using local like r10k: https://github.com/puppetlabs/r10k/blob/master/doc/puppetfile.mkd#local

We would use an already given standard and could work with local modules.

func0der avatar Mar 25 '18 23:03 func0der