-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
roles: fix step_cli_install var being overwritten (#379)
roles: fix step_cli_install being overwritten this patch renames the internal variables used by the roles to determine whether step-cli is installed to a different value than the user-facing `step_cli_install` variable that toggles installation. Fixes a case where a user that set step_cli_install as a role variable in their playbook would get errors about step_cli_install being a bool and not having an RC object due to the internal var being overwritten.
- Loading branch information
Showing
2 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
- name: Look for step_cli_executable # noqa command-instead-of-shell | ||
#"command" is a shell builtin, hence the need for the shell module | ||
shell: "command -v {{ step_cli_executable }}" | ||
register: step_cli_install | ||
register: _step_cli_install | ||
# dash (Debian sh shell) uses 127 instead of 1 for not found errors | ||
failed_when: step_cli_install.rc not in [0,1,127] | ||
failed_when: _step_cli_install.rc not in [0,1,127] | ||
changed_when: no | ||
check_mode: no | ||
- name: Verify that `step-cli` is installed | ||
assert: | ||
that: step_cli_install.rc == 0 | ||
that: _step_cli_install.rc == 0 | ||
fail_msg: "Could not find step-cli at path '{{ step_cli_executable }}'. Please install step-cli via maxhoesel.smallstep.step_cli or step_bootstrap_host" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters