Skip to content

Commit

Permalink
refactor(variable names): use dbpassword consistently across formula
Browse files Browse the repository at this point in the history
Even though MySQL / PostgreSQL versions of zabbix-proxy is not supported by this formula
consistent variable naming across formula would be useful in the future.
  • Loading branch information
hatifnatt committed Jul 10, 2020
1 parent e4952f0 commit 5b4b787
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion zabbix/files/default/etc/zabbix/zabbix_proxy.conf.jinja
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{% from "zabbix/map.jinja" import zabbix with context -%}
{% set settings = salt['pillar.get']('zabbix-proxy', {}) -%}
{% set defaults = zabbix.get('proxy', {}) -%}
{# This required for backward compatibility -#}
{% if 'dbpass' in settings -%}
{% do settings.update({'dbpassword': settings['dbpass']}) -%}
{% endif -%}
# Managed by saltstack
# This is a configuration file for Zabbix proxy daemon
# To get more information about Zabbix, visit http://www.zabbix.com
Expand Down Expand Up @@ -220,7 +224,7 @@
# Mandatory: no
# Default:
# DBPassword=
{% if settings.get('dbpass', defaults.get('dbpass', False)) %}DBPassword={{ settings.get('dbpass', defaults.dbpass) }}{% endif %}
{% if settings.get('dbpassword', defaults.get('dbpassword', False)) %}DBPassword={{ settings.get('dbpassword', defaults.dbpassword) }}{% endif %}

### Option: DBSocket
# Path to MySQL socket.
Expand Down

0 comments on commit 5b4b787

Please sign in to comment.