Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Error: Duplicate declaration: File[undef] is already declared #79

Open
jacobbednarz opened this issue Nov 15, 2016 · 6 comments
Open

Error: Duplicate declaration: File[undef] is already declared #79

jacobbednarz opened this issue Nov 15, 2016 · 6 comments

Comments

@jacobbednarz
Copy link
Member

Error: Duplicate declaration: File[undef] is already declared in file /opt/boxen/repo/shared/mysql/manifests/config.pp:40; cannot redeclare at /opt/boxen/repo/shared/mysql/manifests/config.pp:40 on node hades.local

raised by @typhonius (https://twitter.com/adammalone/status/798316957074239488)

@typhonius
Copy link

This occurs when I use puppet-mysql >= 1.99.990, the latest puppet-php and then declare:

  $version = '5.6.9'
  class { 'php::global':
    version => $version
  }

@jacobbednarz
Copy link
Member Author

I've got a feeling this is breaking down at https://github.com/boxen/puppet-php/blob/master/manifests/version.pp#L12 since it's pulling it in. Most likely an unexpected variable scoping issue 😢

@typhonius
Copy link

After forking boxen/puppet-php, removing the include mysql::config and hardcoding the socket, I was able to get boxen to complete so this issue is probably better off over there.

If I was looking to access a variable defined within the puppet-mysql project in a puppet-php manifest, what would the best way to approach that?

@jacobbednarz
Copy link
Member Author

Ideally there should be a separation of concerns. puppet-php should not be dependant on puppet-mysql for that sort of configuration but I understand they often work hand in hand for things like PDO drivers.

It looks like past @typhonius might have already solved this one for you 😉 boxen/puppet-php#84

@typhonius
Copy link

That's hilarious. Thanks for pointing out the obvious!

@jacobbednarz
Copy link
Member Author

If you want to get those tests green, I'm happy to land that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants