mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
* nmcli: honor IP options for VPNs
This can be used for split tunneling - I extended a test as an example.
* Add changelog
(cherry picked from commit 946c48d148)
Co-authored-by: Chih-Hsuan Yen <yan12125@gmail.com>
This commit is contained in:
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)."
|
||||||
@@ -1737,6 +1737,7 @@ class Nmcli(object):
|
|||||||
'802-11-wireless',
|
'802-11-wireless',
|
||||||
'gsm',
|
'gsm',
|
||||||
'wireguard',
|
'wireguard',
|
||||||
|
'vpn',
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -1208,6 +1208,8 @@ TESTCASE_VPN_L2TP = [
|
|||||||
'ipsec-enabled': 'true',
|
'ipsec-enabled': 'true',
|
||||||
'ipsec-psk': 'QnJpdHRhbnkxMjM=',
|
'ipsec-psk': 'QnJpdHRhbnkxMjM=',
|
||||||
},
|
},
|
||||||
|
'gw4_ignore_auto': True,
|
||||||
|
'routes4': ['192.168.200.0/24'],
|
||||||
'autoconnect': 'false',
|
'autoconnect': 'false',
|
||||||
'state': 'present',
|
'state': 'present',
|
||||||
'_ansible_check_mode': False,
|
'_ansible_check_mode': False,
|
||||||
@@ -1220,7 +1222,14 @@ connection.type: vpn
|
|||||||
connection.autoconnect: no
|
connection.autoconnect: no
|
||||||
connection.permissions: brittany
|
connection.permissions: brittany
|
||||||
ipv4.method: auto
|
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.method: auto
|
||||||
|
ipv6.ignore-auto-dns: no
|
||||||
|
ipv6.ignore-auto-routes: no
|
||||||
vpn.service-type: org.freedesktop.NetworkManager.l2tp
|
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.data: gateway = vpn.example.com, ipsec-enabled = true, ipsec-psk = QnJpdHRhbnkxMjM=, password-flags = 2, user = brittany
|
||||||
vpn.secrets: ipsec-psk = QnJpdHRhbnkxMjM=
|
vpn.secrets: ipsec-psk = QnJpdHRhbnkxMjM=
|
||||||
@@ -1251,7 +1260,13 @@ connection.type: vpn
|
|||||||
connection.autoconnect: no
|
connection.autoconnect: no
|
||||||
connection.permissions: brittany
|
connection.permissions: brittany
|
||||||
ipv4.method: auto
|
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.method: auto
|
||||||
|
ipv6.ignore-auto-dns: no
|
||||||
|
ipv6.ignore-auto-routes: no
|
||||||
vpn.service-type: org.freedesktop.NetworkManager.pptp
|
vpn.service-type: org.freedesktop.NetworkManager.pptp
|
||||||
vpn.data: gateway=vpn.example.com, password-flags=2, user=brittany
|
vpn.data: gateway=vpn.example.com, password-flags=2, user=brittany
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user