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

Handling non-updatable attributes while updating a resource #486

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

shivashankar-vaddepally
Copy link
Contributor

@shivashankar-vaddepally shivashankar-vaddepally commented Jan 29, 2025

The user has run a playbook where the user tries to update some non-updatable parameters in an entity. Previously an error was thrown in such cases.

Now Instead, a warning was thrown and changed = False to handle the given case gracefully.

ubuntu@ubuntu:~/workspace/ansible-collection-netscaleradc/examples$ ansible-playbook lbvserver.yaml
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Sample lbvserver playbook] ****************************************************************************************************************

TASK [Configure lbvserver] **********************************************************************************************************************
[WARNING]: DEBUG: Resource not updated because - Cannot change value for the following non-updateable attributes ['port', 'td']
ok: [localhost]

PLAY RECAP **************************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant