Created
December 18, 2023 22:12
-
-
Save steveclarke/a94461818e4c0ee237282a864d924916 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/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