You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given this (weired?) behavior of APIC (I confirmed this behavior is the same on APIC versions 3.0, 3.1 and 2.1), I think the current implementation of aci_changed() might be insufficient.
The text was updated successfully, but these errors were encountered:
ISSUE TYPE
Bug Report
maybe Enhancement request?
COMPONENT NAME
aci_rest
ANSIBLE VERSION
CONFIGURATION
DEFAULT_DEBUG(env: ANSIBLE_DEBUG) = False
DEFAULT_STRATEGY(env: ANSIBLE_STRATEGY) = linear
OS / ENVIRONMENT
N/A
SUMMARY
aci_rest module does not always detect changed config, but reports it as unchanged ("ok:")
STEPS TO REPRODUCE
Depending on how you push the config to APIC the aci_rest module detects it as changed or not:
This example will always report as unchanged:
This playbook works as expected ("ok:" if nothing has changed and "changed:" otherwise)
Note the difference in path: parameter (infra.xml vs. infra/.xml) as well as adjusted content.
EXPECTED RESULTS
In both cases changes to actual APIC config should result in "changed:" status
ACTUAL RESULTS
The reason why the first playbook does not behave as expected is that APIC does not populate the "status=" parameter as expected by the aci_rest module (it will only report change if this parameter is set to either of 'created', 'modified', 'deleted')
(see https://github.com/datacenter/aci-ansible/blob/e87db8f15e34ea7dc2e1b30fd445a4c59561bbc9/library/aci_rest.py#L270-L284)
On the other hand the second playbook runs as expected as returned data from APIC contains (status='modified'):
Given this (weired?) behavior of APIC (I confirmed this behavior is the same on APIC versions 3.0, 3.1 and 2.1), I think the current implementation of aci_changed() might be insufficient.
The text was updated successfully, but these errors were encountered: