I have the case where I have 3 salt states A.sls, B.sls and C.sls of which only one will be applied on a host.
All 3 of them sets a jinja variable x to a specific value and then I want all 3 to call a mutual salt state D.sls which makes use of x.
How do I do this? I tried using include: D.sls
but it is executed before I can set variable.
Asked
Active
Viewed 2,403 times
1

gavenant
- 123
- 5
1 Answers
1
The trick was not to use the Salt "include" directive, but the jinja include as shown in this answer: Passing variables with include in salt-stack

gavenant
- 123
- 5