-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Do not manage mysql.ini when using Ubuntu repo #330
Conversation
As a workaround, one can utilize stages if on a new version of puppet to execute this outside of the scope of the module until this PR gets merged in (bump). |
is what that potential workaround looks like |
Another temporary workaround, which may be a bit simpler, is to override the
Using this method, the |
@BenConstable That was a clever idea, but in my case it simply puts To be fair I set the config via Hiera, so perhaps that makes a difference in my case. It appears Hiera treats the undef as a string.
Any idea how to apply this workaround correctly via Hiera? |
@BenConstable I managed to answer my own question. The correct setting in Hiera is:
This indeed causes the |
In yaml you can use null to mean undef |
@tdm4 thanks for this PR. Are you able to rebase? I also added a few inline comments. |
@@ -67,46 +67,61 @@ | |||
$module_path = undef | |||
} | |||
|
|||
$ini_name = downcase($so_name) | |||
if $::operatingsystem == 'Ubuntu' and $zend != true and $name == 'mysql' { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use the new $facts hash instead of topscope facts
# If mysql.ini exists and version is 7.0 or 7.1, then remove it | ||
if $php::globals::php_version == '7.0' or $php::globals::php_version == '7.1' { | ||
exec { 'Remove_php_mysql_ini': | ||
command => "phpdismod mysql; rm -f /etc/php/${php::globals::php_version}/mods-available/mysql.ini", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't think that an exec() doing rm is the correct approach here. A file resource with ensure => absent is probably the way to go.
Thanks for opening this issue. It hasn't seen activity in a while, so I'm going to close the issue. This doesn't mean that we don't think this issue is valid, we're just trying to assess what issues are still relevant. If you still need this(even if you're not willing to work on it yourself) please feel free to reopen it. Again thanks for opening the issue, users who report bugs and ask for features are some of the most important players in the open source community. Feel free to hop by #voxpupuli on irc.freenode.net if you'd like to chat with us about any of this. |
@bastelfreak Only project managers can reopen PRs/issues. This PR is still relevant. |
@jonhattan are you interested in rebasing this and adressing the inline comments I made in the last review? |
When using the Ubuntu PPA repo, the php::extension::config tries to manage mysql.ini even though it does not exist in PHP 7.0 or 7.1. This results in a PHP warning about mysql.so not existing. This diff disables and removes the mysql.ini file if using PHP 7.0 or 7.1.