Compare commits
2 Commits
69a8e6abcb
...
c88d178997
Author | SHA1 | Date | |
---|---|---|---|
|
c88d178997 | ||
17394546f7 |
16
entrypoint
16
entrypoint
@ -5,7 +5,7 @@ verbosity=${PLUGIN_VERBOSITY:-0}
|
|||||||
|
|
||||||
run_command(){
|
run_command(){
|
||||||
echo "\$ $@"
|
echo "\$ $@"
|
||||||
$($@)
|
$@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -18,21 +18,21 @@ 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"
|
||||||
run_command echo "$PLUGIN_PRIVATE_KEY" > /root/.ssh/id_ed
|
echo \"$PLUGIN_PRIVATE_KEY\" > /root/.ssh/id_ed
|
||||||
run_command chmod 400 /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
|
run_command "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
|
run_command "ansible-galaxy install -r $PLUGIN_GALAXY_FILE --force"
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -53,5 +53,5 @@ 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
|
run_command "export ANSIBLE_HOST_KEY_CHECKING=False"
|
||||||
run_command ansible-playbook $args
|
run_command "ansible-playbook $args"
|
Reference in New Issue
Block a user