Skip to content

Commit

Permalink
Always output results
Browse files Browse the repository at this point in the history
  • Loading branch information
branic committed Oct 14, 2024
1 parent bbd7d3e commit 3ba79c1
Showing 1 changed file with 45 additions and 35 deletions.
80 changes: 45 additions & 35 deletions roles/install_cloud_clis/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,48 @@
gather_subset:
- "!all"

- name: Install AWS CLI
ansible.builtin.include_tasks:
file: aws_cli.yml

- name: Install OC CLI
ansible.builtin.include_tasks:
file: oc_cli.yml

- name: Install ROSA CLI
ansible.builtin.include_tasks:
file: rosa_cli.yml

- name: Install Tekton CLI
ansible.builtin.include_tasks:
file: tekton_cli.yml

- name: Install kube-linter
ansible.builtin.include_tasks:
file: kube-linter.yml

- name: Install kustomize
ansible.builtin.include_tasks:
file: kustomize.yml

- name: Install stern
ansible.builtin.include_tasks:
file: stern.yml

- name: Install helm
ansible.builtin.include_tasks:
file: helm.yml

- name: Display upgrade results
ansible.builtin.debug:
msg: "{{ (__cloud_cli_update_results | length > 0) | ternary(__cloud_cli_update_results, 'All CLIs are already at the latest version') }}"
- name: Update CLIs (Block)
block:
- name: Install AWS CLI
ansible.builtin.include_tasks:
file: aws_cli.yml

- name: Install OC CLI
ansible.builtin.include_tasks:
file: oc_cli.yml

- name: Install ROSA CLI
ansible.builtin.include_tasks:
file: rosa_cli.yml

- name: Install Tekton CLI
ansible.builtin.include_tasks:
file: tekton_cli.yml

- name: Install kube-linter
ansible.builtin.include_tasks:
file: kube-linter.yml

- name: Install kustomize
ansible.builtin.include_tasks:
file: kustomize.yml

- name: Install stern
ansible.builtin.include_tasks:
file: stern.yml

- name: Install helm
ansible.builtin.include_tasks:
file: helm.yml

# rescue:
# - name: Error encountered
# ansible.builtin.debug:
# msg: |
# "An error was encountered in the '{{ ansible_failed_task.name }}'"
# "{{ ansible_failed_result }}"

always:
- name: Display upgrade results
ansible.builtin.debug:
msg: "{{ (__cloud_cli_update_results | length > 0) | ternary(__cloud_cli_update_results, 'All CLIs are already at the latest version') }}"

0 comments on commit 3ba79c1

Please sign in to comment.