TheKevJames / puppet-homebrew

homebrew (+brewcask! +taps!) package installer and provider
https://forge.puppet.com/thekevjames/homebrew
Apache License 2.0
18 stars 44 forks source link

Installing homebrew with puppet enterprise fails #80

Closed yaron-idan closed 7 years ago

yaron-idan commented 7 years ago

When trying to use PE to install homebrew the operation fails with the following error -

Error: Could not retrieve catalog from remote server:
Error 500 on SERVER: Server Error:
Evaluation Error: Error while evaluating a Resource Statement, 
Evaluation Error: Error while evaluating a Resource Statement,
Duplicate declaration: File[/usr/local] is already declared in file /etc/puppetlabs/code/environments/production/modules/homebrew/manifests/install.pp:19;
    cannot redeclare at /opt/puppetlabs/puppet/modules/puppet_enterprise/manifests/symlinks.pp:31
    at /opt/puppetlabs/puppet/modules/puppet_enterprise/manifests/symlinks.pp:31:5 on node solutosmacvm11.local

Is there any way to solve this error without disabling symlinks?

Mac is running macos sierra 10.12.3 PE version is 2016.4.2

TheKevJames commented 7 years ago

Looks like this bug had been reported to PE and marked as wontfix (they recommend disabling symlinks).

Just in case we can think of a good way around it, could you paste the contents of /opt/puppetlabs/puppet/modules/puppet_enterprise/manifests/symlinks.pp? Here's hoping we can find a way to work around it.

yaron-idan commented 7 years ago

Sure, here's the link to a gist containing it - https://gist.github.com/yaron-idan/4ac84d073bdfaadf0530335e0e7a88dc

TheKevJames commented 7 years ago

Hmm, at first glance it looks like its not possible to have both modules working together without changes on both sides. I'll keep thinking about this; we might be able to write a PE-specific patch.

For my own future reference: stdlib::ensure_resource looks like it would be closer to correct, but will still throw an error since the definitions are incompatible.

yaron-idan commented 7 years ago

I figured the same thing. Anyway I'm gonna close it since your suggestion to disable symlinks did the trick. Thanks!