Persist static IPs via Ansible to survive VM reboots
common role: add nmcli task that ensures the static IP, gateway, and DNS are configured in NetworkManager — idempotent, only applies when network_gateway is defined. Fixes Gitea going offline after reboot because the NM connection had reverted to DHCP. group_vars/infra: add network vars (10.10.1.0/24, gw 10.10.1.1) group_vars/claude_code_vms: add network vars (10.10.2.0/24, gw 10.10.2.1) also fix ProxyJump to use adyrem@:2222 (root login was disabled) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,2 +1,7 @@
|
||||
ansible_user: adyrem
|
||||
ansible_ssh_common_args: "-o ProxyJump=root@192.168.1.10 -o StrictHostKeyChecking=accept-new"
|
||||
ansible_ssh_common_args: "-o ProxyJump=adyrem@192.168.1.10:2222 -o StrictHostKeyChecking=accept-new"
|
||||
|
||||
network_interface: ens18
|
||||
network_prefix: 24
|
||||
network_gateway: 10.10.2.1
|
||||
network_dns: 10.10.1.2
|
||||
|
||||
Reference in New Issue
Block a user