Ask Your Question

How to avoid conflicts when forking a module?

asked 2014-09-22 07:14:48 -0500

fuero gravatar image

I want to use a module (say forge/module 4.1.0) from puppetforge, but it lacks some features I need. Other modules by the same publisher I want to use depend on this module.

When using librarian-puppet 1.0.9 (puppet master/agent version is 3.6.2) to create my $modulesdir, how can I ensure that my modified version is pulled without breaking other modules?

Things I've tried:

  • Changing forge to corp obviously doesn't work because of the other puppetforge module's dependencies.
  • Changing all the modules I need to avoid the clash seems like too much of a hassle.
  • Appending a site-specific suffix like -corp0 didn't work, despite librarian-puppet printing an error message mentioning and the rules there suggest that this is acceptable. Also, it's not clear how depending on that would work according to the metadata.json syntax.

My solution was to specify a version number like 4.99.0 and depend on that in the Puppetfile.

Apart from the obvious answer of trying to get my changes accepted by upstream, what's the canonical answer to managing a customized version of a such a module with librarian-puppet?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-09-22 10:52:19 -0500

lavaman gravatar image

You just use the git reference syntax instead of the forge syntax:

mod 'puppetlabs-apt',
  :git => "git://",
  :ref => '0.0.3'

Then just specify the url of your fork instead of upstream.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-09-22 07:14:48 -0500

Seen: 233 times

Last updated: Sep 22 '14