ext_pillar modules simply have a function named ext_pillar() that will
be called every time the salt-master compiles the pillar for a minion.
So when a minion asks the salt-master for its pillar data the flow is
like this:
- Minion sends '_pillar' command to Master
- Master compiles the pillar data for that minion id from the tops files
(if any)
- Master then takes that pillar data and calls each ext_pillar in order
- The ext_pillar module accepts the minion_id, pillar as compiled from
the tops, and the ext_pillar configuration for itself.
- The ext_pillar module does whatever, then returns a dict that will be
used to update() the existing pillar.
- After all ext_pillars are called, the master returns the pillar to the
minion.
The cmd_json ext_pillar is actually really simple and easy to see how it
works:
https://github.com/saltstack/salt/blob/develop/salt/pillar/cmd_json.py#L17
--
Dave
> --
> 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/groups/opt_out.