Skip to content

Instantly share code, notes, and snippets.

@steveclarke
Created December 18, 2023 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steveclarke/a94461818e4c0ee237282a864d924916 to your computer and use it in GitHub Desktop.
Save steveclarke/a94461818e4c0ee237282a864d924916 to your computer and use it in GitHub Desktop.
#/usr/bin/env bash
install_on_ubuntu() {
sudo apt update
sudo apt install -y ansible
}
OS="$(uname -s)"
# Install Ansible by platform
case "${OS}" in
Linux*)
if [ -f /etc/lsb-release ]; then
install_on_ubuntu
else
echo "Unsupported Linux distro"
exit 1
fi
;;
Darwin*)
echo "MacOS Not supported yet"
;;
*)
echo "Unsupported operating system: ${OS}"
exit 1
;;
esac
ansible-playbook ~/setup.yml --ask-become-pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment