Closed rfranks-securenet closed 1 year ago
When adding a BGP neighbor password the password is set to the address of the neighbor.
I believe this is due to https://github.com/ansible-collections/vyos.vyos/blob/d181df0cc702cbafb8a9cd640b2eeb6cc3b9a962/plugins/module_utils/network/vyos/rm_templates/bgp_global.py#L876 setting the password to {{ neighbor.address }} rather than {{ neighbor.password }}
{{ neighbor.address }}
{{ neighbor.password }}
bgp_global
ansible [core 2.14.2] config file = None configured module search path = ['/home/rfranks/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/rfranks/.venv/lib/python3.9/site-packages/ansible ansible collection location = /home/rfranks/.ansible/collections:/usr/share/ansible/collections executable location = /home/rfranks/.venv/bin/ansible python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] (/home/rfranks/.venv/bin/python3) jinja version = 3.1.2 libyaml = True
/home/rfranks/.ansible/collections/ansible_collections Collection Version ---------- ------- vyos.vyos 4.0.1 # /home/rfranks/.venv/lib/python3.9/site-packages/ansible_collections Collection Version ---------- ------- vyos.vyos 4.0.0
CONFIG_FILE() = None
VyOS 1.3-rolling-202001081700
Try to roll out a BGP neighbor configuration with password. The password will be set to whatever is in the address field.
address
- hosts: all tasks: - name: Test bgp vyos.vyos.vyos_bgp_global: config: as_number: "65000" neighbor: - address: "10.20.30.40" remote_as: "65001" password: "password" state: merged
password is set to "password"
"password"
password is set to 10.20.30.40
SUMMARY
When adding a BGP neighbor password the password is set to the address of the neighbor.
I believe this is due to https://github.com/ansible-collections/vyos.vyos/blob/d181df0cc702cbafb8a9cd640b2eeb6cc3b9a962/plugins/module_utils/network/vyos/rm_templates/bgp_global.py#L876 setting the password to
{{ neighbor.address }}
rather than{{ neighbor.password }}
ISSUE TYPE
COMPONENT NAME
bgp_global
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
VyOS 1.3-rolling-202001081700
STEPS TO REPRODUCE
Try to roll out a BGP neighbor configuration with password. The password will be set to whatever is in the
address
field.EXPECTED RESULTS
password is set to
"password"
ACTUAL RESULTS
password is set to 10.20.30.40