diff --git a/roles/colima/molecule/buildkit/converge.yml b/roles/colima/molecule/buildkit/converge.yml index 23310c7..e4e2058 100644 --- a/roles/colima/molecule/buildkit/converge.yml +++ b/roles/colima/molecule/buildkit/converge.yml @@ -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" diff --git a/roles/colima/molecule/buildkit/vars/main.yml b/roles/colima/molecule/buildkit/vars/main.yml index 7eebce3..9a360bb 100644 --- a/roles/colima/molecule/buildkit/vars/main.yml +++ b/roles/colima/molecule/buildkit/vars/main.yml @@ -1,6 +1,8 @@ --- # defaults file for role-colima +colima_service_user: "{{ lookup('env', 'USER') }}" + colima_homebrew_retries: 4 colima_service_startup_delay: 1 diff --git a/roles/colima/molecule/common/tasks/display_logs.yml b/roles/colima/molecule/common/tasks/display_logs.yml index 7536c38..3bafb47 100644 --- a/roles/colima/molecule/common/tasks/display_logs.yml +++ b/roles/colima/molecule/common/tasks/display_logs.yml @@ -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: diff --git a/roles/colima/molecule/standard/converge.yml b/roles/colima/molecule/standard/converge.yml index 23310c7..e4e2058 100644 --- a/roles/colima/molecule/standard/converge.yml +++ b/roles/colima/molecule/standard/converge.yml @@ -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" diff --git a/roles/colima/molecule/standard/vars/main.yml b/roles/colima/molecule/standard/vars/main.yml index ed97d53..6082a79 100644 --- a/roles/colima/molecule/standard/vars/main.yml +++ b/roles/colima/molecule/standard/vars/main.yml @@ -1 +1,3 @@ --- + +colima_service_user: "{{ lookup('env', 'USER') }}"