From b71e9c7c39827fd9a888ddc1fbe951b3268955d0 Mon Sep 17 00:00:00 2001 From: wefers Date: Tue, 9 Apr 2024 16:13:00 +0200 Subject: [PATCH] Change Network interface file from enp7s0 to eth0 --- inventory.yml | 1 - playbook.yml | 2 +- tasks/hetzner_nat/configuration_nat.yml | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/inventory.yml b/inventory.yml index 0a17d49..f78b287 100644 --- a/inventory.yml +++ b/inventory.yml @@ -26,7 +26,6 @@ all: nat-gateway: ansible_host: 65.109.4.220 ansible_python_interpreter: /usr/bin/python3.11 - ansible_ssh_common_args: '-o ProxyCommand="ssh -p 22 -W %h:%p -q root@65.109.4.220"' kubernetes_api: hosts: diff --git a/playbook.yml b/playbook.yml index b89f997..5ef1eb7 100644 --- a/playbook.yml +++ b/playbook.yml @@ -6,6 +6,6 @@ gather_facts: false connection: local -- import_playbook: playbooks/setup_hetzner_nat.yml +#- import_playbook: playbooks/setup_hetzner_nat.yml - import_playbook: playbooks/setup_k8s_cluster.yml diff --git a/tasks/hetzner_nat/configuration_nat.yml b/tasks/hetzner_nat/configuration_nat.yml index a5dc1f2..45a51e9 100644 --- a/tasks/hetzner_nat/configuration_nat.yml +++ b/tasks/hetzner_nat/configuration_nat.yml @@ -19,8 +19,8 @@ blockinfile: path: /etc/network/interfaces block: | - auto enp7s0 - iface enp7s0 inet dhcp + auto eth0 + iface eth0 inet dhcp post-up echo 1 > /proc/sys/net/ipv4/ip_forward - post-up iptables -t nat -A POSTROUTING -s '10.0.0.0/16' -o enp7s0 -j MASQUERADE + post-up iptables -t nat -A POSTROUTING -s '10.0.0.0/16' -o eth0 -j MASQUERADE