Anton A
2015-10-31 22:08:03 UTC
Hi people!
I'm trying to create map.jinja to math ipv4 by subnet and assign server
variable related to subnet.
Here is map.jinja:
{% set zabbix_agent = salt['grains.filter_by']({
'10.0.1*': {
'server': '10.0.1.24'
},
'10.0.2*': {
'server': '10.0.2.24'
}
},
grain='ip4_interfaces:eth0:0',
merge=salt['pillar.get']('zabbix_agent:lookup')
)
%}
It doesn't work because mask here is useless.
Anybody, do you have ideas how to make it work ?
Is there only way to create own grains.filter_by_subnet function ?
Thanks.
I'm trying to create map.jinja to math ipv4 by subnet and assign server
variable related to subnet.
Here is map.jinja:
{% set zabbix_agent = salt['grains.filter_by']({
'10.0.1*': {
'server': '10.0.1.24'
},
'10.0.2*': {
'server': '10.0.2.24'
}
},
grain='ip4_interfaces:eth0:0',
merge=salt['pillar.get']('zabbix_agent:lookup')
)
%}
It doesn't work because mask here is useless.
Anybody, do you have ideas how to make it work ?
Is there only way to create own grains.filter_by_subnet function ?
Thanks.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.