🚑 Fix host key checking

This commit is contained in:
sebclem 2021-12-15 17:15:50 +01:00
parent 716484773a
commit 3264c1dab9

View File

@ -9,12 +9,11 @@ if [[ -z "$PLUGIN_PLAYBOOK" ]]; then
fi
if [[ -z "$PLUGIN_PRIVATE_KEY" ]]; then
echo -e "\e[31m'private_key' setting not defined, ABORT!\e[39m"
exit 1
fi
echo -e "\e[31m[WARN] 'private_key' setting not defined !\e[39m"
else
echo "$PLUGIN_PRIVATE_KEY" > /root/.ssh/id_ed
chmod 400 /root/.ssh/id_ed
fi
if [[ -n "$PLUGIN_VAULT_TOKEN" ]]; then
echo "Adding vault token to 'credentials/vault_token'"
@ -48,4 +47,5 @@ if [[ -n "$PLUGIN_LIMIT" ]]; then
fi
echo "\$ ansible-playbook $args"
export ANSIBLE_HOST_KEY_CHECKING=False
ansible-playbook $args