1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

nmcli: honor IP options for VPNs (#5228)

* nmcli: honor IP options for VPNs

This can be used for split tunneling - I extended a test as an example.

* Add changelog
This commit is contained in:
Chih-Hsuan Yen 2022-09-08 13:44:54 +08:00 committed by GitHub
parent 015566fb06
commit 946c48d148
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- "nmcli - honor IP options for VPNs (https://github.com/ansible-collections/community.general/pull/5228)."

View file

@ -1730,6 +1730,7 @@ class Nmcli(object):
'802-11-wireless',
'gsm',
'wireguard',
'vpn',
)
@property

View file

@ -1208,6 +1208,8 @@ TESTCASE_VPN_L2TP = [
'ipsec-enabled': 'true',
'ipsec-psk': 'QnJpdHRhbnkxMjM=',
},
'gw4_ignore_auto': True,
'routes4': ['192.168.200.0/24'],
'autoconnect': 'false',
'state': 'present',
'_ansible_check_mode': False,
@ -1220,7 +1222,14 @@ connection.type: vpn
connection.autoconnect: no
connection.permissions: brittany
ipv4.method: auto
ipv4.routes: { ip = 192.168.200.0/24 }
ipv4.never-default: no
ipv4.may-fail: yes
ipv4.ignore-auto-dns: no
ipv4.ignore-auto-routes: yes
ipv6.method: auto
ipv6.ignore-auto-dns: no
ipv6.ignore-auto-routes: no
vpn.service-type: org.freedesktop.NetworkManager.l2tp
vpn.data: gateway = vpn.example.com, ipsec-enabled = true, ipsec-psk = QnJpdHRhbnkxMjM=, password-flags = 2, user = brittany
vpn.secrets: ipsec-psk = QnJpdHRhbnkxMjM=
@ -1251,7 +1260,13 @@ connection.type: vpn
connection.autoconnect: no
connection.permissions: brittany
ipv4.method: auto
ipv4.never-default: no
ipv4.may-fail: yes
ipv4.ignore-auto-dns: no
ipv4.ignore-auto-routes: no
ipv6.method: auto
ipv6.ignore-auto-dns: no
ipv6.ignore-auto-routes: no
vpn.service-type: org.freedesktop.NetworkManager.pptp
vpn.data: gateway=vpn.example.com, password-flags=2, user=brittany
"""