diff --git a/group_vars/all/vars.yml b/group_vars/all/vars.yml index df2fe04..98c60f5 100644 --- a/group_vars/all/vars.yml +++ b/group_vars/all/vars.yml @@ -73,6 +73,9 @@ subnet_prefix: /24 # in connection.yml local_ip: 192.168.0.3 +# Gateway address (this is your router's IP) +gateway: 192.168.0.1 + # Connection interface for static IP interface: eth0 diff --git a/roles/networking/connection/tasks/main.yml b/roles/networking/connection/tasks/main.yml index 355edab..d3f4690 100644 --- a/roles/networking/connection/tasks/main.yml +++ b/roles/networking/connection/tasks/main.yml @@ -43,6 +43,7 @@ dns4: "{{ dns_forward }}" dns4_ignore_auto: yes ip4: "{{ local_ip }}{{ subnet_prefix }}" + gw4: "{{ gateway }}" method4: manual state: present conn_name: wired