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

arista.eos.eos_acls log: false treated as log: true #470

Open
bewing opened this issue Oct 26, 2023 · 1 comment
Open

arista.eos.eos_acls log: false treated as log: true #470

bewing opened this issue Oct 26, 2023 · 1 comment
Assignees
Labels
acls acls resource module bug This issue/PR relates to a bug.

Comments

@bewing
Copy link

bewing commented Oct 26, 2023

SUMMARY

Placing log: false in an ACE results in the log statement being present in the config.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

arista.eos.eos_acls

ANSIBLE VERSION
$ ansible --version
ansible [core 2.15.5]
  config file = /home/bewing/.ansible.cfg
  configured module search path = ['/home/bewing/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /export/home/bewing/.pyenv/versions/3.9.18/lib/python3.9/site-packages/ansible
  ansible collection location = /export/home/bewing/.ansible/collections:/usr/share/ansible/collections
  executable location = /export/home/bewing/.pyenv/versions/3.9.18/bin/ansible
  python version = 3.9.18 (main, Oct 19 2023, 17:02:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] (/home/bewing/.pyenv/versions/3.9.18/bin/python3.9)
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
$ ansible-galaxy collection list arista.eos

# /export/home/bewing/.ansible/collections/ansible_collections
Collection Version
---------- -------
arista.eos 6.1.2
CONFIGURATION
$ ansible-config dump --only-changed
OS / ENVIRONMENT
STEPS TO REPRODUCE
---
- name: example acl
  arista.eos.eos_acls:
    config:
    - afi: ipv4
      acls:
      - name: test-acls
        aces:
        - sequence: 10
          grant: allow
          destination:
            any: true
          source:
            any: true
          protocol: ip
          log: false
EXPECTED RESULTS
ip access-list test-acls
  seq 10 permit ip any any
ACTUAL RESULTS
ip access-list test-acls
  seq 10 permit ip any any log

root cause:

if "log" in ace.keys():
command = command + " log"

suggest changing to

if ace.get("log", False):
    command = command + " log"
@bewing
Copy link
Author

bewing commented Oct 26, 2023

this appears to be a pattern for most of the bools in the ACE as well

@NilashishC NilashishC added acls acls resource module bug This issue/PR relates to a bug. labels Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acls acls resource module bug This issue/PR relates to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants