-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Fix for php db package name on Ubuntu 16.04 #284
Fix for php db package name on Ubuntu 16.04 #284
Conversation
It looks like the |
Hi @frozenfoxx, thanks for the PR! I guess you have to do something disgusting like I did here: |
fca9e77
to
c9bbe8b
Compare
@@ -56,7 +56,20 @@ def package_provider_for_gems | |||
let :params do | |||
super().merge(database_type: 'postgresql') | |||
end | |||
packages = facts[:osfamily] == 'RedHat' ? ['zabbix-web-pgsql', 'zabbix-web'] : ['zabbix-frontend-php', 'php5-pgsql'] | |||
|
|||
pgsqlpackage = "" |
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.
this is not needed
@@ -67,7 +80,20 @@ def package_provider_for_gems | |||
let :params do | |||
super().merge(database_type: 'mysql') | |||
end | |||
packages = facts[:osfamily] == 'RedHat' ? ['zabbix-web-mysql', 'zabbix-web'] : ['zabbix-frontend-php', 'php5-mysql'] | |||
|
|||
mysqlpackage = "" |
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.
not needed
case facts[:osfamily] | ||
when 'Debian' | ||
if facts[:operatingsystemmajrelease] >= '16.04' | ||
pgsqlpackage = "php-pgsql" |
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.
migrate all of the double quotes to single quotes unless they contain a variable
|
||
pgsqlpackage = "" | ||
case facts[:osfamily] | ||
when 'Debian' |
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 migrate to ConditionalAssignment
mysqlpackage = "" | ||
case facts[:osfamily] | ||
when 'Debian' | ||
if facts[:operatingsystemmajrelease] >= '16.04' |
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.
same here, please migrate to ConditionalAssignment
@@ -56,7 +56,25 @@ def package_provider_for_gems | |||
let :params do | |||
super().merge(database_type: 'postgresql') | |||
end | |||
packages = facts[:osfamily] == 'RedHat' ? ['zabbix-web-pgsql', 'zabbix-web'] : ['zabbix-frontend-php', 'php5-pgsql'] | |||
|
|||
pgsqlpackage = case facts[:operatingsystem] |
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.
almost feels like package maintainer hate us
As explained in #282 the code for installing the php5 database package does not currently work on Ubuntu 16.04. This is because the name has changed from "php5-${db}" to "php-${db}" in the official repos. This pull will update it only in those instances and still use the legacy facts for determining version for backward compatibility.