-
-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot declare both php and php::cli classes #489
Comments
Currently my workaround is as follows:
The downside is that Puppet now writes 256M and then rewrites 1000M on every run. |
Hi @sunnz, we currently don't support different settings for CLI vs non-CLI. Are you interested in providing a patch for this? |
Sure! How about adding an extra For example, then I would use it like:
|
Please see patch: https://github.com/voxpupuli/puppet-php/commit/97ae907c969e0d7897fd26e7abff0142e7ddbae5.diff Which I have created a pull request #491 for it too. Thanks! |
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
What are you seeing
Duplicate declaration: Class[Php::Cli] is already declared.
What behaviour did you expect instead
max_execution_time
set to60
andmemory_limit
set to256M
in/etc/php.ini
and/etc/php-fpm.ini
.max_execution_time
set to0
andmemory_limit
set to1000M
in/etc/php-cli.ini
.Output log
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Class[Php::Cli] is already declared at (file: /etc/puppetlabs/code/environments/production/modules/php/manifests/init.pp, line: 164); cannot redeclare (file: /etc/puppetlabs/code/environments/production/site/profile/manifests/php.pp, line: 16) (file: /etc/puppetlabs/code/environments/production/site/profile/manifests/php.pp, line: 16, column: 3) on node test-web
Any additional information you'd like to impart
It seems like
php::cli
is being declared insidephp
class, so I cannot redeclare it. But thephp
class just pass the same options tophp::cli
.How do I specify default settings for PHP and only override some of those for PHP CLI?
The text was updated successfully, but these errors were encountered: