Skip to content

Commit

Permalink
test(COLIMA): show logs on converge failure
Browse files Browse the repository at this point in the history
  • Loading branch information
niall-byrne committed Aug 23, 2023
1 parent 048f415 commit be6b5b3
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 6 deletions.
14 changes: 11 additions & 3 deletions roles/colima/molecule/buildkit/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
- name: Setup Scenario
ansible.builtin.include_tasks: "../common/tasks/setup.yml"

- name: Include osx_provisioner.collection.colima
ansible.builtin.include_role:
name: "osx_provisioner.collection.colima"
- name: Display Logs For Troubleshooting Failures
block:

- name: Include osx_provisioner.collection.colima
ansible.builtin.include_role:
name: "osx_provisioner.collection.colima"

rescue:

- name: Display Logs
ansible.builtin.include_tasks: "../common/tasks/display_logs.yml"
2 changes: 2 additions & 0 deletions roles/colima/molecule/buildkit/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
# defaults file for role-colima

colima_service_user: "{{ lookup('env', 'USER') }}"

colima_homebrew_retries: 4

colima_service_startup_delay: 1
Expand Down
3 changes: 3 additions & 0 deletions roles/colima/molecule/common/tasks/display_logs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
- name: Load Default Var Content
ansible.builtin.include_vars: "../../../defaults/main.yml"

- name: Create Log File List
ansible.builtin.set_fact:
colima_molecule_log_list:
Expand Down
14 changes: 11 additions & 3 deletions roles/colima/molecule/standard/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
- name: Setup Scenario
ansible.builtin.include_tasks: "../common/tasks/setup.yml"

- name: Include osx_provisioner.collection.colima
ansible.builtin.include_role:
name: "osx_provisioner.collection.colima"
- name: Display Logs For Troubleshooting Failures
block:

- name: Include osx_provisioner.collection.colima
ansible.builtin.include_role:
name: "osx_provisioner.collection.colima"

rescue:

- name: Display Logs
ansible.builtin.include_tasks: "../common/tasks/display_logs.yml"
2 changes: 2 additions & 0 deletions roles/colima/molecule/standard/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
---

colima_service_user: "{{ lookup('env', 'USER') }}"

0 comments on commit be6b5b3

Please sign in to comment.