diff --git a/group_vars/all/vars.yml b/group_vars/all/vars.yml index 2bc1d7f..df2fe04 100644 --- a/group_vars/all/vars.yml +++ b/group_vars/all/vars.yml @@ -64,6 +64,9 @@ dns_forward: 1.1.1.1 # Local IP address subnet local_subnet: 192.168.0.0/24 + +# CIDR prefix +subnet_prefix: /24 # Static address of the server (locally) # Preferably have another one to SSH into with Ansible, as we change the IP midway diff --git a/roles/networking/connection/tasks/main.yml b/roles/networking/connection/tasks/main.yml index 80ba822..b10a320 100644 --- a/roles/networking/connection/tasks/main.yml +++ b/roles/networking/connection/tasks/main.yml @@ -42,7 +42,7 @@ community.general.nmcli: dns4: "{{ dns_forward }}" dns4_ignore_auto: yes - ip4: "{{ local_ip }}" + ip4: "{{ local_ip }}{{ subnet_prefix }}" method4: manual state: present conn_name: wired