Open mgoetze5 opened 9 months ago
BTW this is a similar issue to #95 where there is also incongruence between the REST-level and the ansible-level failure/success identification.
Hi, Ansible compares the switch configuration with the playbook configuration, if both are the same for that attribute/object then the PATCH/POST request is not sent. As discussed #95, is not reproducible with the v1.3.3 Ansible FOS version and 9.2.1 switch release. Please let us know if you see this issue with the latest Ansible version. Regards, Prasad
Well in this case a POST was sent and the switch configuration did not change as specified. This is with brocade.fos 1.3.3 from galaxy.
logical_switch_config:
This is a ready-only parameter you can't use it for configuration. There is no REST equivalent for CLI command "lscfg --change 128 -newfid 10" If you remove default_switch from the configuration, it will create a logical switch.
In case it needs support through REST, please raise RFE through PM. If there are no further issues, please suggest if we can close this issue.
@prasad-valmeti-broadcom I understand that this is not supported by REST and therefore expected to fail at the REST level. But the problem is that once again REST level errors are not showing up as errors at the Ansible level. As I said in the initial report
Expected behaviour is then for ansible to mark the task as failed and abort execution of the playbook, however ansible marked the task as OK and continued execution of the playbook.
Thanks for the update. This issue will be addressed in Ansible FOS 2.0.0. In case if you want to take care in your branch, please change the following file with the changes mentioned below: diff --git a/utils/brocade_connection.py b/utils/brocade_connection.py index 2ddc390..d6f1a05 100644 --- a/utils/brocade_connection.py +++ b/utils/brocade_connection.py @@ -136,6 +136,7 @@ def exit_after_login(fos_ip_addr, https, auth, result, module, timeout): :return: 0 :rtype: int """
result["failed"] = True logout(fos_ip_addr, https, auth, result, timeout) module.exit_json(**result) return 0
Hope this will address the issue that is reported.
I tried to change the default VFID on a Brocade G720 running FOS 9.1.1c like so:
with
This works on a switch where I have previously executed
lscfg --change 128 -newfid 10
. However on a switch with factory default settings I get a 405 response with the following REST error:Expected behaviour is then for ansible to mark the task as failed and abort execution of the playbook, however ansible marked the task as OK and continued execution of the playbook.
PS is there any way to change the VFID of the default LS via API?