Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - set_fact:
- args:
- c_name: "{{ outer_item.name }}"
- tmp_proxy: "{{ outer_item.proxy | default([]) }}"
- tmp_devices: "{{ outer_item.devices | default([]) }}"
- - name: Populate proxy_devices
- set_fact:
- 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 ) }}"
- with_items: "{{ tmp_proxy }}"
- - name: Merge
- set_fact:
- devices: "{{ tmp_devices | combine (proxy_devices) }}"
Add Comment
Please, Sign In to add comment