[patch] check if efs id is not None in ocp_deprovision for rosa #2008
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
After ansible version is updated, efs id value returned is null but since we are only checking for not empty, it is trying to get efs detail for null efs id and failed
`TASK [ibm.mas_devops.ocp_deprovision : Filter-efsId : EfsId] *******************
ok: [localhost] => {"ansible_facts": {"efs_id": null}, "changed": false}
TASK [ibm.mas_devops.ocp_deprovision : rosa : Get-mountId : MountId] ***********
[ERROR]: Task failed: Module failed: non-zero return code
Origin: /opt/app-root/lib64/python3.12/site-packages/ansible_collections/ibm/mas_devops/roles/ocp_deprovision/tasks/providers/rosa.yml:115:7
113 when: efs_id != ""
114 block:
115 - name: "rosa : Get-mountId : MountId"
^ column 7
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "aws efs describe-mount-targets --file-system-id --query "MountTargets[*].MountTargetId"", "delta": "0:00:00.937337", "end": "2025-12-02 09:32:57.214194", "msg": "non-zero return code", "rc": 252, "start": "2025-12-02 09:32:56.276857", "stderr": "\naws: [ERROR]: argument --file-system-id: expected one argument\n\nusage: aws [options] [ ...] [parameters]\nTo see help text, you can run:\n\n aws help\n aws help\n aws help", "stderr_lines": ["", "aws: [ERROR]: argument --file-system-id: expected one argument", "", "usage: aws [options] [ ...] [parameters]", "To see help text, you can run:", "", " aws help", " aws help", " aws help"], "stdout": "", "stdout_lines": []}
`