Open bewing opened 1 year ago
Placing log: false in an ACE results in the log statement being present in the config.
log: false
log
arista.eos.eos_acls
$ 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
$ ansible-galaxy collection list arista.eos # /export/home/bewing/.ansible/collections/ansible_collections Collection Version ---------- ------- arista.eos 6.1.2
$ ansible-config dump --only-changed
--- - 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
ip access-list test-acls seq 10 permit ip any any
ip access-list test-acls seq 10 permit ip any any log
root cause: https://github.com/ansible-collections/arista.eos/blob/eb7f54865bb3c0f0e66c97f1ef6e0eeacb8c7360/plugins/module_utils/network/eos/config/acls/acls.py#L585-L586
suggest changing to
if ace.get("log", False): command = command + " log"
this appears to be a pattern for most of the bools in the ACE as well
SUMMARY
Placing
log: false
in an ACE results in thelog
statement being present in the config.ISSUE TYPE
COMPONENT NAME
arista.eos.eos_acls
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
root cause: https://github.com/ansible-collections/arista.eos/blob/eb7f54865bb3c0f0e66c97f1ef6e0eeacb8c7360/plugins/module_utils/network/eos/config/acls/acls.py#L585-L586
suggest changing to