Update 'entrypoint'
This commit is contained in:
parent
c14ec8723c
commit
b76bce16e0
15
entrypoint
15
entrypoint
@ -23,21 +23,27 @@ else
|
|||||||
run_command chmod 400 /root/.ssh/id_ed25519
|
run_command chmod 400 /root/.ssh/id_ed25519
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
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="$args --vault-password-file credentials/vault_token"
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -f "ansible-ci.cfg" ]]; then
|
||||||
|
rm ansible.cfg
|
||||||
|
mv ansible-ci.cfg ansible.cfg
|
||||||
|
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
|
||||||
|
|
||||||
args="$PLUGIN_PLAYBOOK"
|
|
||||||
|
|
||||||
if [[ $check = true ]]; then
|
if [[ $check = true ]]; then
|
||||||
args="$args --syntax-check"
|
args="$args --syntax-check"
|
||||||
fi
|
fi
|
||||||
@ -53,10 +59,5 @@ if [[ -n "$PLUGIN_LIMIT" ]]; then
|
|||||||
args="${args} --limit \"$PLUGIN_LIMIT\""
|
args="${args} --limit \"$PLUGIN_LIMIT\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -f "ansible-ci.cfg" ]]; then
|
|
||||||
rm ansible.cfg
|
|
||||||
mv ansible-ci.cfg ansible.cfg
|
|
||||||
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