David Nelson
2016-10-26 18:35:44 UTC
Learning Salt and trying to understand what's going with pillar data and
how things work under the covers. This is against salt-2016.3.3 if that
matters. Take the following three pillar files and examples:
top.sls:
base:
'*':
- one
one.sls:
one:
- uid: 101
two.sls:
two:
- uid: 102
Then, refresh the pillar data with 'salt minion saltutil.refresh_pillar'.
Then, check to see what pillar data the minion sees with 'salt minion
pillar.items'. I get:
minion:
----------
one:
|_
----------
uid:
101
Then update 'top.sls' but DO NOT refresh the pillar data:
base:
'*':
- one
- two
Then check the pillar items with 'salt minion pillar.items'. I get:
minion:
----------
one:
|_
----------
uid:
101
two:
|_
----------
uid:
102
But then when I try to access the individual keys within the pillar data, I
run into problems until I refresh the pillar data:
# salt 'minion' pillar.get one
minion:
|_
----------
uid:
101
# salt 'minion' pillar.get two
minion:
#
# salt 'minion' saltutil.refresh_pillar
minion:
True
#
# salt 'minion' pillar.get two
minion:
|_
----------
uid:
102
#
Why are the keys present with 'pillar.items' but not with 'pillar.get
<key>'?
Thank you
how things work under the covers. This is against salt-2016.3.3 if that
matters. Take the following three pillar files and examples:
top.sls:
base:
'*':
- one
one.sls:
one:
- uid: 101
two.sls:
two:
- uid: 102
Then, refresh the pillar data with 'salt minion saltutil.refresh_pillar'.
Then, check to see what pillar data the minion sees with 'salt minion
pillar.items'. I get:
minion:
----------
one:
|_
----------
uid:
101
Then update 'top.sls' but DO NOT refresh the pillar data:
base:
'*':
- one
- two
Then check the pillar items with 'salt minion pillar.items'. I get:
minion:
----------
one:
|_
----------
uid:
101
two:
|_
----------
uid:
102
But then when I try to access the individual keys within the pillar data, I
run into problems until I refresh the pillar data:
# salt 'minion' pillar.get one
minion:
|_
----------
uid:
101
# salt 'minion' pillar.get two
minion:
#
# salt 'minion' saltutil.refresh_pillar
minion:
True
#
# salt 'minion' pillar.get two
minion:
|_
----------
uid:
102
#
Why are the keys present with 'pillar.items' but not with 'pillar.get
<key>'?
Thank you
--
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.