Compare commits

..

1 Commits

Author SHA1 Message Date
renovate-bot
6ccdc58bf3 Add renovate.json
Some checks reported errors
continuous-integration/drone/push Build was killed
2021-12-15 16:15:58 +00:00

View File

@ -3,12 +3,6 @@
check=${PLUGIN_CHECK_SYNTAX:-false} check=${PLUGIN_CHECK_SYNTAX:-false}
verbosity=${PLUGIN_VERBOSITY:-0} verbosity=${PLUGIN_VERBOSITY:-0}
run_command(){
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
@ -17,22 +11,21 @@ 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
echo "$PLUGIN_PRIVATE_KEY" > /root/.ssh/id_ed
run_command mkdir /root/.ssh chmod 400 /root/.ssh/id_ed
run_command echo "$PLUGIN_PRIVATE_KEY" > /root/.ssh/id_ed
run_command chmod 400 /root/.ssh/id_ed
fi fi
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 mkdir credentials
run_command echo $PLUGIN_VAULT_TOKEN > credentials/vault_token echo $PLUGIN_VAULT_TOKEN > credentials/vault_token
echo "" echo ""
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 echo "\$ ansible-galaxy install -r $PLUGIN_GALAXY_FILE --force"
ansible-galaxy install -r $PLUGIN_GALAXY_FILE --force
echo "" echo ""
fi fi
@ -53,5 +46,6 @@ if [[ -n "$PLUGIN_LIMIT" ]]; then
args="${args} --limit \"$PLUGIN_LIMIT\"" args="${args} --limit \"$PLUGIN_LIMIT\""
fi fi
run_command export ANSIBLE_HOST_KEY_CHECKING=False echo "\$ ansible-playbook $args"
run_command ansible-playbook $args export ANSIBLE_HOST_KEY_CHECKING=False
ansible-playbook $args