kayobe/ansible/roles/snat/tasks/main.yml
Mark Goddard b2a60340c2 Enable IP routing and SNAT in seed for use during provisioning
Without this there may not be a gateway configured after the control plane nodes
are provisioned, meaning they cannot access the outside world.
2017-03-30 11:04:27 +01:00

13 lines
345 B
YAML

---
# iptables -t nat -A POSTROUTING -o {{ interface }} -j SNAT --to-source {{ source_ip }}
- name: Ensure SNAT iptables rules exist
iptables:
action: append
table: nat
chain: POSTROUTING
out_interface: "{{ item.interface }}"
jump: SNAT
to_source: "{{ item.source_ip }}"
with_items: "{{ snat_rules }}"
become: True