Advertisement
Guest User

Untitled

a guest
Apr 30th, 2014
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. [root@web_server vagrant]# salt-call network.ip_addrs
  2. local:
  3. - 10.0.2.15
  4. - 10.255.255.2
  5.  
  6. SOO..
  7.  
  8. {%- set isLocal = "false" -%}
  9. {% for host,ip in salt['mine.get']('*', 'network.ip_addrs').items() -%}
  10. {% if ip|replace("10.255.255", "LOCAL").split('LOCAL').count() == 2 %}
  11. {%- set isLocal = "true" -%}
  12. {%- endif %}
  13. {%- endfor %}
  14.  
  15.  
  16. But This is always false though
  17. {% if isLocal == "true" %}
  18. - env.development
  19. {% else %}
  20. - env.production
  21. {%- endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement