Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@web_server vagrant]# salt-call network.ip_addrs
- local:
- - 10.0.2.15
- - 10.255.255.2
- SOO..
- {%- set isLocal = "false" -%}
- {% for host,ip in salt['mine.get']('*', 'network.ip_addrs').items() -%}
- {% if ip|replace("10.255.255", "LOCAL").split('LOCAL').count() == 2 %}
- {%- set isLocal = "true" -%}
- {%- endif %}
- {%- endfor %}
- But This is always false though
- {% if isLocal == "true" %}
- - env.development
- {% else %}
- - env.production
- {%- endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement