1

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.

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.