Closed smw1218 closed 11 years ago
this code evaluated like gid(node['zabbix']['agent']['gid']) or node['zabbix']['agent']['group']
instead of the expected
gid(node['zabbix']['agent']['gid'] or node['zabbix']['agent']['group'])
the || operator should fixes this because it's got higher precedence.
shame on me, I didn't know this difference between || and or.
http://devblog.avdi.org/2010/08/02/using-and-and-or-in-ruby/
why ruby... why?..
Thank you @smw1218
this code evaluated like gid(node['zabbix']['agent']['gid']) or node['zabbix']['agent']['group']
instead of the expected
gid(node['zabbix']['agent']['gid'] or node['zabbix']['agent']['group'])
the || operator should fixes this because it's got higher precedence.