Closed erenfro closed 10 years ago
Can reproduce. The method is working on the command line, but failing in pillar SLS files.
top.sls:
base:
'*':
- test
test.sls:
mypillar: {{ salt['grains.get']('server_id', []) }}
mypillar
gets set to 0
for me, when it should be the server_id (1670551073
in this case) or an empty list.
The above PR fixes this issue in my testing. I have labeled this bug as Fixed and also as Needs Testing. Pinging @rallytime for some QA here to prevent regressions.
Reopened because 8ac3aad was revert for now.
This is similar to https://github.com/saltstack/salt/issues/10954
I have in my /etc/salt/grains:
on nodes hv1, and hv2.
I have an ntp pillar that fails this segment and instead provides the data in else:
If I use
grains['roles']
it works, butsalt['grains.get']('roles', [])
fails. This functionally worked in 0.17.1-0.17.4, and only upgrading to 2014.1.1 causes this to fail, completely changing several things that have been using the more reliable grains.get method!