On 14-10-11 08:40 PM, Stephen Wood wrote:
I have a small module that manipulates SSH public keys. The problem I am
having is that the pillar data gets stale and there doesn't appear to be
any way to refresh it via the module.
I added the follow and tested it:

user = __salt__['pillar.get']("some_user")
Given the delay in responding, I suspect that you have already solved
this, but just in case...

You don't appear to actually be running saltutil.refresh_pillar here,
merely referencing it. You need to add the parentheses.

   response = __salt__['saltutil.refresh_pillar']()
   user = __salt__['pillar.get']("some_user")

I noticed this because my Jinja templates are full of stuff like:

   {% set _p = salt['pillar.get'] %}

where _p is a reference to the function and so can be invoked like:

   {{ _p('user') }} .

Steve Butterworth | It is difficult to get a man to understand
something when his salary depends upon his
not understanding it. -- Upton Sinclair
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 | 2 of 3 | next ›
Discussion Overview
groupsalt-users @
postedOct 12, '14 at 12:41a
activeOct 26, '14 at 12:11p



site design / logo © 2022 Grokbase