✏️ Add emoji
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone Build was killed

This commit is contained in:
SebClem 2022-04-26 11:24:48 +02:00
parent 8b8365e102
commit 8b72b03342
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50

View File

@ -4,18 +4,18 @@ check=${PLUGIN_CHECK_SYNTAX:-false}
verbosity=${PLUGIN_VERBOSITY:-0} verbosity=${PLUGIN_VERBOSITY:-0}
run_command(){ run_command(){
echo "\$ $@" echo "➡️ $@"
$@ $@
} }
if [[ -z "$PLUGIN_PLAYBOOK" ]]; then if [[ -z "$PLUGIN_PLAYBOOK" ]]; then
echo -e "\e[31m'playbook' setting not defined, ABORT!\e[39m" echo -e "⚠️ \e[31m'playbook' setting not defined, ABORT!\e[39m"
exit 1 exit 1
fi fi
if [[ -z "$PLUGIN_PRIVATE_KEY" ]]; then if [[ -z "$PLUGIN_PRIVATE_KEY" ]]; then
echo -e "\e[31m[WARN] 'private_key' setting not defined !\e[39m" echo -e "⚠️ \e[31m[WARN] 'private_key' setting not defined !\e[39m"
else else
run_command "mkdir /root/.ssh" run_command "mkdir /root/.ssh"
@ -26,7 +26,7 @@ fi
args=("$PLUGIN_PLAYBOOK") args=("$PLUGIN_PLAYBOOK")
if [[ -n "$PLUGIN_VAULT_TOKEN" ]]; then if [[ -n "$PLUGIN_VAULT_TOKEN" ]]; then
echo "Adding vault token to 'credentials/vault_token'" echo "💼 Adding vault token to 'credentials/vault_token'"
run_command "mkdir credentials" run_command "mkdir credentials"
echo "$PLUGIN_VAULT_TOKEN" > credentials/vault_token echo "$PLUGIN_VAULT_TOKEN" > credentials/vault_token
args+=("--vault-password-file" "credentials/vault_token") args+=("--vault-password-file" "credentials/vault_token")
@ -39,7 +39,7 @@ if [[ -f "ansible-ci.cfg" ]]; then
fi fi
if [[ -n "$PLUGIN_GALAXY_FILE" ]]; then if [[ -n "$PLUGIN_GALAXY_FILE" ]]; then
echo "Installing Galaxy dependencies ($PLUGIN_GALAXY_FILE)" echo "🚀 Installing Galaxy dependencies ($PLUGIN_GALAXY_FILE)"
run_command "ansible-galaxy install -r $PLUGIN_GALAXY_FILE --force" run_command "ansible-galaxy install -r $PLUGIN_GALAXY_FILE --force"
echo "" echo ""
fi fi
@ -65,5 +65,5 @@ if [[ -n "$PLUGIN_TAGS" ]]; then
fi fi
run_command "export ANSIBLE_HOST_KEY_CHECKING=False" run_command "export ANSIBLE_HOST_KEY_CHECKING=False"
echo "ansible-playbook ${args[@]}" echo "➡️ ansible-playbook ${args[@]}"
ansible-playbook "${args[@]}" ansible-playbook "${args[@]}"