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:
parent
015566fb06
commit
946c48d148
3 changed files with 18 additions and 0 deletions
2
changelogs/fragments/5228-nmcli-ip-options.yaml
Normal file
2
changelogs/fragments/5228-nmcli-ip-options.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- "nmcli - honor IP options for VPNs (https://github.com/ansible-collections/community.general/pull/5228)."
|
|
@ -1730,6 +1730,7 @@ class Nmcli(object):
|
|||
'802-11-wireless',
|
||||
'gsm',
|
||||
'wireguard',
|
||||
'vpn',
|
||||
)
|
||||
|
||||
@property
|
||||
|
|
|
@ -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
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue