Trying to pass a pillar file to an Orchestration

20 views
Skip to first unread message

Sid Young

unread,
Jan 14, 2025, 9:37:02 PMJan 14
to Salt-users
G'Day all,

I am pulling what hair I have left out trying to get a list of servernames passed into an orchestration:

/srv/pillar/wp-servers.sls
servers:
  - wp-nginx-01
  - wp-nginx-02
  - wp-haproxy-01
  - wp-redis-01
  -  wp-db-01

What should my "pillar="" command line option look like to reference the actual file?I even added it to /srv/pillar/top.sls under the base to force it to be included and no luck.

Also in my orchestration SLS file, I assume I can just use:
{% set wp_servers = salt['pillar.get']('servers') %}

I understand the runner has no idea of minions but surly I can pass in a file fo data rather than hardcode it in the SLS file (last resort).

Very frustrating!

Sid

Phipps, Thomas

unread,
Jan 14, 2025, 9:57:56 PMJan 14
to salt-...@googlegroups.com
so, no you cannot pass in a file... pillar option only accepts a dict that will be parsed AS pillar.

however. the saltmaster also has pillars. the trick is finding it's id and assigning them.


--
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.
To view this discussion visit https://groups.google.com/d/msgid/salt-users/0c277072-981e-4408-a77e-0ce7e70de3can%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages