Output formatting

This commit is contained in:
Sebastian Haderecker 2019-04-16 09:15:00 +00:00
parent a5f0b912a1
commit c15e94cf26

View file

@ -2,28 +2,28 @@
# Check if required packages are installed # Check if required packages are installed
if ! hash ansible 2>/dev/null; then if ! hash ansible 2>/dev/null; then
echo "Package 'ansible' is missing. Please install it with:" echo "### Package 'ansible' is missing. Please install it with:"
echo " sudo apt-add-repository --yes --update ppa:ansible/ansible" echo " sudo apt-add-repository --yes --update ppa:ansible/ansible"
echo " sudo apt install ansible" echo " sudo apt install ansible"
exit 1 exit 1
fi fi
if ! hash pwgen 2>/dev/null; then if ! hash pwgen 2>/dev/null; then
echo "Package 'pwgen' is missing. Please install it with:" echo "### Package 'pwgen' is missing. Please install it with:"
echo " sudo apt install pwgen" echo " sudo apt install pwgen"
exit 1 exit 1
fi fi
if ! hash jq 2>/dev/null; then if ! hash jq 2>/dev/null; then
echo "Package 'jq' is missing. Please install it with:" echo "### Package 'jq' is missing. Please install it with:"
echo " sudo apt install jq" echo " sudo apt install jq"
exit 1 exit 1
fi fi
# Check for Agent Forwarding # Check for Agent Forwarding
if ! printenv | grep SSH_AUTH_SOCK > /dev/null; then if ! printenv | grep SSH_AUTH_SOCK > /dev/null; then
echo "Agent forwarding seems to be disabled." echo "### Agent forwarding seems to be disabled."
echo "In order to let Ansible do its work, please enable it." echo "### In order to let Ansible do its work, please enable it."
exit 1 exit 1
fi fi