We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a694be3 commit 7e5c051Copy full SHA for 7e5c051
ansible/roles/gateway/files/gateway-init.yml
@@ -53,15 +53,17 @@
53
54
- name: Remove undesired gateways
55
shell: |
56
- nmcli connection modify '{{ item.connection }}' ipv4.gateway ''
+ nmcli connection modify '{{ item.connection }}' \
57
+ ipv4.never-default yes \
58
+ ipv6.never-default yes
59
nmcli connection up '{{ item.connection }}'
60
when:
61
- gateway_ip != ''
62
- item.ip4_gateway != ''
63
- item.connection != gateway_ip_connection
64
loop: "{{ nmcli_devices }}"
65
- - name: Add desired gateways # TESTED OK
66
+ - name: Add desired gateways
67
68
nmcli connection modify '{{ item.connection }}' \
69
ipv4.address {{ item.ip4_address }} \
0 commit comments