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

import policy list not correct in junipernetworks.junos.junos_bgp_global #509

Open
clintong opened this issue Apr 9, 2024 · 0 comments
Open
Assignees

Comments

@clintong
Copy link

clintong commented Apr 9, 2024

SUMMARY

I am using junipernetworks.junos.junos_bgp_global and would like to define bgp import policies under config>import or under config>neighbors>import. The definition is a list of policies that are already defined in junos. The issue is that the commands sent to junos are sent with an added single quotes hence junos will interpret the single quote as part of the name resulting in an error on commit.

config

  • name: Merge provided bgp config with device configuration
    junipernetworks.junos.junos_bgp_global:
    config:
    import:
    - hello

error

Policy error: Policy ['hello'] referenced but not defined

ISSUE TYPE
  • Bug Report
COMPONENT NAME

junipernetworks.junos.junos_bgp_global

ANSIBLE VERSION

ansible [core 2.14]

COLLECTION VERSION

ansible [core 2.15.10]

CONFIGURATION

OS / ENVIRONMENT
STEPS TO REPRODUCE
- name: Merge provided bgp config with device configuration
  junipernetworks.junos.junos_bgp_global:
    config:
      import:
      - hello
      groups:
      - name: eBGP_12345
        type: external
        description: "Test eBGP config"
        local_address: 5.6.7.8
        export: announce_to_C8
        peer_as: 12235
        neighbors:
          - description: "neighbor"
            neighbor_address: 1.2.3.4
            preference: 19
      as_number: "{{ROUTER_ASN}}"
      damping: true
      remove_private:
        set: true
    state: merged
EXPECTED RESULTS
ACTUAL RESULTS
FAILED! => {"changed": false, "module_stderr": "b\"error: Policy error: Policy ['hello'] referenced but not defined\\nerror: BGP: import list not applied\\nerror: configuration check-out failed\"", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error"}

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

No branches or pull requests

3 participants