-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8cce7de
commit c15c311
Showing
3 changed files
with
20 additions
and
1 deletion.
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
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
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
action_vault(){ | ||
if [[ $1 == "edit" ]]; then | ||
|
||
if [[ -z $2 ]];then | ||
echo "${BOLD}${RED}❌ Please specify a file to edit.${RESET}" | ||
return 1 | ||
fi | ||
|
||
echo "${BOLD}${YELLOW}ℹ️ We're using ansible-vault within the container to edit your file, which uses \"vi\".${RESET}" | ||
echo "${BOLD}${YELLOW}👉 To edit the file, press i.${RESET}" | ||
echo "${BOLD}${YELLOW}💾 To save your changes and exit, press ESC, then type \":wq\" and press ENTER.${RESET}" | ||
fi | ||
docker run --name spin-ansible --rm -it -v "$(pwd)":/ansible $DEFAULT_ANSIBLE_IMAGE ansible-vault "$@" | ||
} |