Open TheRealBecks opened 7 months ago
When deleting a port_protocol from an ACL ACE the no <sequence number> command is missing and an error-message will be provided as the to be changed/configured sequence number already exists.
port_protocol
no <sequence number>
eos_acls
ansible [core 2.15.6] config file = /home/mbeckert/Entwicklung/Strato/lightning/lightning/ansible.cfg configured module search path = ['/home/mbeckert/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/mbeckert/.local/share/virtualenvs/lightning-vg2lOQBb/lib/python3.11/site-packages/ansible ansible collection location = /home/mbeckert/.ansible/collections:/usr/share/ansible/collections executable location = /home/mbeckert/.local/share/virtualenvs/lightning-vg2lOQBb/bin/ansible python version = 3.11.6 (main, Nov 15 2023, 09:22:27) [GCC] (/home/mbeckert/.local/share/virtualenvs/lightning-vg2lOQBb/bin/python) jinja version = 3.1.2 libyaml = True
Collection Version ----------------- ------- community.general 7.5.1
CONFIG_FILE() = /home/mbeckert/Entwicklung/Strato/lightning/lightning/ansible.cfg DEFAULT_FORKS(/home/mbeckert/Entwicklung/Strato/lightning/lightning/ansible.cfg) = 10 DEFAULT_HASH_BEHAVIOUR(/home/mbeckert/Entwicklung/Strato/lightning/lightning/ansible.cfg) = merge DEFAULT_HOST_LIST(/home/mbeckert/Entwicklung/Strato/lightning/lightning/ansible.cfg) = ['/home/mbeckert/Entwicklung/Strato/lightning/lightning/inventory.yml'] DEFAULT_ROLES_PATH(/home/mbeckert/Entwicklung/Strato/lightning/lightning/ansible.cfg) = ['/home/mbeckert/Entwicklung/Strato/lightning/lightning/roles'] DEFAULT_VAULT_PASSWORD_FILE(/home/mbeckert/Entwicklung/Strato/lightning/lightning/ansible.cfg) = /home/mbeckert/Entwicklung/Strato/lightning/lightning/.vault_passphrase/open_vault.sh EDITOR(env: EDITOR) = nano PAGER(env: PAGER) = less
Arista EOS 4.28.4M
Before task.yml:
task.yml
--- - name: Network temp main block: - name: Network temp main block arista.eos.eos_acls: state: "replaced" config: - afi: ipv4 acls: - name: test-acl - sequence: 10 grant: permit protocol: udp source: any: true destination: any: true port_protocol: eq: bfd
After task.yml:
--- - name: Network temp main block: - name: Network temp main block arista.eos.eos_acls: state: "replaced" config: - afi: ipv4 acls: - name: test-acl - sequence: 10 grant: permit protocol: udp source: any: true destination: any: true
-> port_protocol has been deleted
On the second run the sequence number 10 will be deleted before a new 10 will be configured.
To be generated commands:
commands
[ 'ip access-list test-acl2', 'no 10', '10 permit udp any any' ]
On the second run on the configuration will fail on the device:
fatal: [sw-arista-test1.11.example.net]: FAILED! => { "changed": false, "module_stderr": "10 permit udp any any\r\n% Error: Duplicate sequence number\r\nsw-arista-test1(config-s-ansible_17-acl-test-acl2)#", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error" }
--> Duplicate sequence number
Duplicate sequence number
Generated commands:
[ 'ip access-list test-acl2', '10 permit udp any any' ]
I already know what's wrong here and I have a potential fix that I can provide within the next few days.
SUMMARY
When deleting a
port_protocol
from an ACL ACE theno <sequence number>
command is missing and an error-message will be provided as the to be changed/configured sequence number already exists.ISSUE TYPE
COMPONENT NAME
eos_acls
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Arista EOS 4.28.4M
STEPS TO REPRODUCE
Before
task.yml
:After
task.yml
:->
port_protocol
has been deletedEXPECTED RESULTS
On the second run the sequence number 10 will be deleted before a new 10 will be configured.
To be generated
commands
:ACTUAL RESULTS
On the second run on the configuration will fail on the device:
-->
Duplicate sequence number
Generated
commands
: