Skip to content

Commit

Permalink
Passing kubecofig to teardown tasks
Browse files Browse the repository at this point in the history
Some tasks during the teardown require a kubeconfig, that is not the case if there is a fail during checking_kubeconfig play execution

TestDallasWorkload: preflight-green

Change-Id: I17fd4964a8e53806e70fd029df13af1b2e7b123c
  • Loading branch information
betoredhat committed Aug 27, 2024
1 parent 8f1b331 commit 4afd609
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions dci-openshift-app-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,28 @@

rescue: &error_with_upload_logs
- name: "Run common logging process"
include_tasks: plays/common_logging.yml
include_tasks:
file: plays/common_logging.yml
apply:
environment:
KUBECONFIG: "{{ kubeconfig_path }}"

- name: "Execute the teardown process"
include_tasks: "{{ dci_config_dir }}/hooks/teardown.yml"
include_tasks:
file: "{{ dci_config_dir }}/hooks/teardown.yml"
apply:
environment:
KUBECONFIG: "{{ kubeconfig_path }}"
when:
- dci_teardown_on_failure
- check_teardown.stat.exists

- name: "Run the teardown play"
include_tasks: plays/teardown.yml
include_tasks:
file: plays/teardown.yml
apply:
environment:
KUBECONFIG: "{{ kubeconfig_path }}"
when:
- dci_teardown_on_failure

Expand Down

0 comments on commit 4afd609

Please sign in to comment.