Ask Your Question

duplicate forge modules a problem?

asked 2014-10-15 15:51:02 -0600

jwatson3d gravatar image

I'm considering using 'iamjbennett/windows_firewall which pulls a dependency on joshcooper/powershell. However, I've already chosen to use the supported version of puppetlabs-powershell. Is it okay to have/use two powershells? I'm assuming that Mr. Bennett would eventually switch to an "official" module right?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-10-17 13:43:57 -0600

jwatson3d gravatar image

No answer after 45 hours so I went ahead and tried slamming both in. Doesn't work. I'm using 'r10k puppetfile install --verbose' and it reports two lines for powershell. Yet, after completion 'puppet module list' only shows the 'puppetlabs-powershell'. Commenting out the PuppetLabs version and Josh Cooper's module is loaded and visible.

Aside, this seems like a bug or a gap - Puppet can't understand two modules named Powershell even though their "fqmn" (fully qualifed module name" are different.

edit flag offensive delete link more

answered 2014-10-17 14:32:49 -0600

cbarbour gravatar image

From puppet's perspective, the fully-qualified names of those two modules are actually the same; both have a fully qualified classname of '::powershell' I'm honestly surprised that joshcooper/powershell installed at all, as there should probably be a conflict.

The prefix puppetlabs and joshcooper are used by the Puppet module tool and the Forge, but are ignored by the class loader.

In this case, you have a dependency conflict. I would be inclined to either find an alternative to 'iamjbennett/windows_firewall' or fork the module and re-work it to use the puppetlabs powershell module. As a general rule, 3rd party module dependencies are a code smell when a Puppet Labs module is available.

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-10-15 15:51:02 -0600

Seen: 486 times

Last updated: Oct 17 '14