feat: internet access to the private compute instances
This commit is contained in:
@@ -2,4 +2,21 @@
|
||||
hosts: gateways
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- ansible.builtin.raw: hostname -I
|
||||
- name: Enable IPv4 forwarding.
|
||||
ansible.posix.sysctl:
|
||||
name: net.ipv4.ip_forward
|
||||
value: '1'
|
||||
sysctl_set: true
|
||||
|
||||
- name: Update and upgrade packages.
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
upgrade: true
|
||||
|
||||
- name: Add routing.
|
||||
ansible.builtin.iptables:
|
||||
table: nat
|
||||
chain: POSTROUTING
|
||||
source: 10.0.0.0/16
|
||||
out_interface: eth0
|
||||
jump: MASQUERADE
|
||||
|
||||
Reference in New Issue
Block a user