parameters for sls files

8 views
Skip to first unread message

john.david.r.smith

unread,
Jan 15, 2017, 12:02:16 PM1/15/17
to salt-...@googlegroups.com
hi.
is it possible to put some kind of parameter for an sls into a top file
and use it in the sls (e.g. via jinja)?
e.g.:

top.top
-------
base:
minion:
- state myparam
-------

state.sls
-------
some-state:
some.module:
- some-param: {{some_code_to_get(myparam)}}
-------

i would like to define the parameter at this place since i have a nice
overview about it when looking at my top file. (and don't have to poke
around for it)

- john

Daniel Wallace

unread,
Jan 17, 2017, 10:50:43 AM1/17/17
to salt-...@googlegroups.com
You could assign extra pillars and use that.

{{pillar.something.else}}

salt \* state.apply pillar="{'something': {'else': True}}"



- john

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/2c56bc07-3ae3-300b-03ca-b997999a046c%40openmailbox.org.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages