Open xenadmin opened 5 years ago
If I remember correctly (and according to the example in pillar.example) to override values from map.jinja
in state (not in generated config file) you need to set values under zabbix:lookup:proxy
i.e.
zabbix:
lookup:
proxy:
pidfile: /tmp/zabbix_proxy.pid
Actually this formula is really clunky and it's require total rewrite mostly from scratch. I point some problems in #79
While testing my proposed changes for #125 in possibly encountered a critical bug.
Steps to reproduce Create a pillar for Zabbx Proxy
/srv/pillar/zabbix/proxy.sls
and write a value for pidfile, logfile, or dbname:Watch the resultant Pillar values on the minion
salt 'zabprox.*' pillar.items
they change accordingly:Make a state apply test
salt 'zabprox.*' state.apply test=true
and watch that the states do not change at all!Expected behavior
/srv/formulas/zabbix-formula/zabbix/proxy/init.sls
has to read in the pillar not only from/srv/formulas/zabbix-formula/zabbix/map.jinja
but also from/srv/pillar/zabbix/proxy.sls
and change the file.directory states accordingly.Partly resoltution I believe this bug was introduced by @hatifnatt in commit 2907cda5f6b087a8b3b59346f7a7b6a3d011de8b and @aboe76 in commit cdf5b804579d409c366fa54db847c43f16a5fbb8 for example.
I build an example solution that works very well for me and solves also #125 but I don't believe it's the right solution as it seems much too complicated: /srv/formulas/zabbix-formula/zabbix/proxy/init.sls
https://gist.github.com/xenadmin/2c951695d215ab9e59f31184642f6c6c/revisions#diff-39859e34161f0cb6f5f50974282a2593
It can't be the solution, to have a line in the header for each and every folder I have to read in from the pillar, including a fallback to the map.jinja, can it?
I would like to ask for your help so we can solve this together!