Guest User

Untitled

a guest
Jun 25th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. ---
  2.  
  3. - set_fact:
  4. args:
  5. c_name: "{{ outer_item.name }}"
  6. tmp_proxy: "{{ outer_item.proxy | default([]) }}"
  7. tmp_devices: "{{ outer_item.devices | default([]) }}"
  8.  
  9. - name: Populate proxy_devices
  10. set_fact:
  11. proxy_devices: "{{ proxy_devices|default({}) | combine( {item.name: { 'listen': item.proto + ':192.168.88.102:' + item.dst|string, 'connect': item.proto + ':127.0.0.1:' + item.nxt|string, 'bind': 'host', 'type': 'proxy' } }, recursive=True ) }}"
  12. with_items: "{{ tmp_proxy }}"
  13.  
  14. - name: Merge
  15. set_fact:
  16. devices: "{{ tmp_devices | combine (proxy_devices) }}"
Add Comment
Please, Sign In to add comment