summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrfranks-securenet <richard.franks@securenetcoms.co.uk>2023-03-28 21:07:01 +0100
committerGitHub <noreply@github.com>2023-03-28 16:07:01 -0400
commit4a4b3487354a484e7bef5d66b6c030a42550bcd8 (patch)
treee2bfdf8c9e38fb3018226c42816002beabc013d8
parent409621196ceb100a0808a1f68365552482231240 (diff)
downloadvyos.vyos-4a4b3487354a484e7bef5d66b6c030a42550bcd8.tar.gz
vyos.vyos-4a4b3487354a484e7bef5d66b6c030a42550bcd8.zip
BGP Password fix (#305)
* BGP Password fix Updated command to use neighbor.password rather than neighbor.address * Added changelog fragment
-rw-r--r--changelogs/fragments/bgp-password-fix.yml2
-rw-r--r--plugins/module_utils/network/vyos/rm_templates/bgp_global.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/changelogs/fragments/bgp-password-fix.yml b/changelogs/fragments/bgp-password-fix.yml
new file mode 100644
index 0000000..5c42404
--- /dev/null
+++ b/changelogs/fragments/bgp-password-fix.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - bgp_global - changed to use `neighbor.password` rather than `neighbor.address` (https://github.com/ansible-collections/vyos.vyos/issues/304).
diff --git a/plugins/module_utils/network/vyos/rm_templates/bgp_global.py b/plugins/module_utils/network/vyos/rm_templates/bgp_global.py
index 0f7fd8b..69cccce 100644
--- a/plugins/module_utils/network/vyos/rm_templates/bgp_global.py
+++ b/plugins/module_utils/network/vyos/rm_templates/bgp_global.py
@@ -873,7 +873,7 @@ class Bgp_globalTemplate(NetworkTemplate):
*$""",
re.VERBOSE,
),
- "setval": "protocols bgp {{ as_number }} neighbor {{ neighbor.address }} password {{ neighbor.address }}",
+ "setval": "protocols bgp {{ as_number }} neighbor {{ neighbor.address }} password {{ neighbor.password }}",
"compval": "neighbor.password",
"result": {
"as_number": "{{ as_num }}",