Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BGP neighbor password set incorrectly #304

Closed
rfranks-securenet opened this issue Mar 22, 2023 · 0 comments · Fixed by #305
Closed

BGP neighbor password set incorrectly #304

rfranks-securenet opened this issue Mar 22, 2023 · 0 comments · Fixed by #305

Comments

@rfranks-securenet
Copy link
Contributor

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
  • Bug Report
COMPONENT NAME

bgp_global

ANSIBLE VERSION
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
COLLECTION VERSION
 /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
CONFIGURATION
CONFIG_FILE() = None
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.

- 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
EXPECTED RESULTS

password is set to "password"

ACTUAL RESULTS

password is set to 10.20.30.40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant