FAQ
I am experiencing issues setting a var using grains.get versus just calling
grains. Is there a different to these two methods that isn't manifestly
obvious?

The grain is available on the host:

$ salt-call grains.get ec2_vpc_id
local:
     vpc-123

But these two lines in a pillar file produce different results:

foo: {{ salt['grains.get']('ec2_vpc_id', None) }}
bar: {{ grains['ec2_vpc_id'] | default(None) }}

$ salt-call pillar.get foo
local:
     None

$ salt-call pillar.get bar
local:
     vpc-123

Both the minion and the master are running the same version of salt
(2014.1.0). The host is both the saltmaster and the salt-minion. Any ideas
what might be causing this?

--
Stephen Wood
www.heystephenwood.com

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupsalt-users @
postedJul 19, '14 at 4:22a
activeJul 25, '14 at 11:11p
posts3
users3

People

Translate

site design / logo © 2022 Grokbase