saltstack-formulas / influxdb-formula

Installs and configures the InfluxDB timeseries database
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Apache License 2.0
9 stars 34 forks source link

fixes a check for os family #3

Closed MrMarvin closed 9 years ago

MrMarvin commented 9 years ago

$var == "foo" or "bar" seems to evaluate to "bar" which is truthy all the time... Even to check for "Ubuntu" is os_family isn't nessesary, Ubuntus os_family is "Debian".

wwentland commented 9 years ago

@nmadhok Why did you close this? os_family is indeed Debian even on Ubuntu. I'll merge this if you have no other reason for closing it.

nmadhok commented 9 years ago

@babilen Closed this by mistake. Wanted to merge this one since Ubuntu falls under Debian os_family

MrMarvin commented 9 years ago

To add to my previous commit: The code for Redhat based distros was never reached. It tried to download a ".deb" on my CentOS.

nmadhok commented 9 years ago

@MrMarvin

{% if grains['os_family'] == 'Debian' or 'Ubuntu' %} Is totally incorrect way to compare since or Ubuntu will always be true and hence this loop will always execute. It should instead have been the following

{% if grains['os_family'] == 'Debian' or grains['os_family'] == 'Ubuntu' %}

nmadhok commented 9 years ago

Since Ubuntu falls under Debian family, that's the only reason i merged the pull request because of the duplication.