diff options
Diffstat (limited to 'ansible/roles')
-rw-r--r-- | ansible/roles/lxc-host/tasks/networkd.yml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ansible/roles/lxc-host/tasks/networkd.yml b/ansible/roles/lxc-host/tasks/networkd.yml index 39d8a69..7ddfaed 100644 --- a/ansible/roles/lxc-host/tasks/networkd.yml +++ b/ansible/roles/lxc-host/tasks/networkd.yml @@ -50,10 +50,18 @@ [Network] {% if internal_if.ipv4 is defined %} Address={{ internal_if.ipv4.address }}/{{ internal_if.ipv4.netmask }} + {% if internal_if.ipv4.gateway is defined %} + Gateway={{ internal_if.ipv4.gateway }} + {% endif %} {% endif %} {% if internal_if.ipv6 is defined %} Address={{ internal_if.ipv6.address }}/{{ internal_if.ipv6.netmask }} {% endif %} + {% if internal_if.dns is defined %} + {% for dns in internal_if.dns %} + DNS={{ dns }} + {% endfor %} + {% endif %} - name: "{{ file_prefix }}-3-{{ lxc_host__internal_if }}.netdev" notify: systemctl restart systemd-networkd |