🚑 Fix host key checking
This commit is contained in:
parent
716484773a
commit
3264c1dab9
10
entrypoint
10
entrypoint
@ -9,13 +9,12 @@ if [[ -z "$PLUGIN_PLAYBOOK" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "$PLUGIN_PRIVATE_KEY" ]]; then
|
if [[ -z "$PLUGIN_PRIVATE_KEY" ]]; then
|
||||||
echo -e "\e[31m'private_key' setting not defined, ABORT!\e[39m"
|
echo -e "\e[31m[WARN] 'private_key' setting not defined !\e[39m"
|
||||||
exit 1
|
else
|
||||||
|
echo "$PLUGIN_PRIVATE_KEY" > /root/.ssh/id_ed
|
||||||
|
chmod 400 /root/.ssh/id_ed
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$PLUGIN_PRIVATE_KEY" > /root/.ssh/id_ed
|
|
||||||
chmod 400 /root/.ssh/id_ed
|
|
||||||
|
|
||||||
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'"
|
||||||
mkdir credentials
|
mkdir credentials
|
||||||
@ -48,4 +47,5 @@ if [[ -n "$PLUGIN_LIMIT" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "\$ ansible-playbook $args"
|
echo "\$ ansible-playbook $args"
|
||||||
|
export ANSIBLE_HOST_KEY_CHECKING=False
|
||||||
ansible-playbook $args
|
ansible-playbook $args
|
Reference in New Issue
Block a user