Skip to content

Commit

Permalink
Merge pull request #78 from psiroky/fix-profile-exists
Browse files Browse the repository at this point in the history
More robust way of detecting if minishift profile exists
  • Loading branch information
arilivigni authored Sep 5, 2018
2 parents 5b6883c + adee6f2 commit 12b1436
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions playbooks/roles/minishift/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

# Check if the minishift profile exists
- name: "Check if the minishift profile exists"
shell: "{{ minishift_bin }} status --profile {{ profile }} | head -1"
shell: "{{ minishift_bin }} status --profile {{ profile }}"
register: minishift_profile_status
ignore_errors: yes

Expand All @@ -58,4 +58,4 @@

# Initialize minishift
- import_tasks: init_minishift.yml
when: (minishift_profile_status.stdout|lower == "does not exist") or (minishift_profile_status.rc != 0)
when: (minishift_profile_status.stdout_lines and minishift_profile_status.stdout_lines[0]|lower == "does not exist") or (minishift_profile_status.rc != 0)

0 comments on commit 12b1436

Please sign in to comment.