Advertisement
Guest User

Untitled

a guest
Nov 18th, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. I get hostname from grains :
  2.  
  3. {% set host_server = salt['grains.get']('host') %}
  4.  
  5.  
  6. I have some IP in pillar with this model :
  7.  
  8. vm_eth0:
  9. redis1: 192.168.1.215
  10.  
  11. I want to match Pillar like this using hostname from $host_server:
  12.  
  13. eth0:
  14. network.managed:
  15. - enabled: True
  16. - type: eth
  17. - proto: none
  18. - ipaddr: {{ salt['pillar.get']['vm_eth0'](host_server) }}
  19.  
  20. Thanks for helping
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement