All Questions
2 questions
1
vote
1
answer
463
views
Is there a more idiomatic way to switch Salt state based on host OS?
At the top of my State file, I have:
{% if grains['os'] == 'Ubuntu' %}
{% set ubuntu = True %}
{% set arch = False %}
{% elif grains['os'] == 'Arch' %}
{% set ubuntu = False %}
{% set arch = ...
9
votes
1
answer
14k
views
salt stack: use state jinja variables in template
What I'd like to do is generate multiple configuration files for each openvpn user.
I have the IP address and additional configuration in pillar.
For example:
openvpn:
- user1:
ip: 1.2.3.4
...