salt['network.ip_networks'] always returns master nets, not minion nets, when used in pillar data #66064
-
If I set a pillar with salt['network.ip_networks'], the pillar will always contain the master's networks, not the minion's. pillars/top.sls
pillars/init.sls
If I call salt['network.ip_networks'] from a state file and pass it to a jinja template or call it from jinja template, I get the minion's networks. This is true with ip_addrs and subnets as well, but grains['ipv4'] always returns the minion's IPs, even when used to set pillars. All hosts are using 3006.6, and this happens on all minions, all of which are mix of rocky, redhat, ubuntu, etc.. master version info
Is this a bug, or am I missing something fundamental? Brian |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This is expected, because states are rendered on a minion, but pillar is rendered on the master. When you call the The |
Beta Was this translation helpful? Give feedback.
-
my workaround: local-grains.sls
|
Beta Was this translation helpful? Give feedback.
This is expected, because states are rendered on a minion, but pillar is rendered on the master. When you call the
network.ip_networks
execution module in a pillar file, it runs on the master and returns master networks.The
grains
dictionary on the master is different and returns grains for each minion that asked for its pillar data.