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

do not fail on delete if it cannot find the rg, cos, or tp #9005

Merged
merged 2 commits into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,38 @@
retries: 5
delay: 10
until: r_login_command_result.rc == 0

- name: Delete IBM Cloud CoS instance with retries
ansible.builtin.command: "ibmcloud resource service-instance-delete {{ ibmcloud_cos_instance_name }} -f"
register: r_cos_delete_command_result
retries: 5
delay: 30
until: r_cos_delete_command_result.rc == 0
failed_when:
- r_cos_delete_command_result.rc != 0
- '"was not found" not in r_cos_delete_command_result.stderr'

- name: Delete IBM Cloud Trusted Profile with retries
ansible.builtin.command: "ibmcloud iam trusted-profile-delete {{ ibmcloud_iam_trusted_profile_name }} -f"
register: r_tp_delete_command_result
retries: 5
delay: 30
until: r_tp_delete_command_result.rc == 0
failed_when:
- r_tp_delete_command_result.rc != 0
- '"was not found" not in r_tp_delete_command_result.stderr'

- name: Delete IBM Cloud resource group with retries
ansible.builtin.command: "ibmcloud resource group-delete {{ ibmcloud_resource_group_name }} -f"
register: r_rg_delete_command_result
retries: 5
delay: 30
until: r_rg_delete_command_result.rc == 0
failed_when:
- r_rg_delete_command_result.rc != 0
- '"was not found" not in r_rg_delete_command_result.stderr'

environment:
IBMCLOUD_API_KEY: "{{ ibmcloud_api_key }}"
become: false
connection: local
connection: local
Loading