Ansible Recipe
- ansible
- git
sudo apt install ansible git
(
set -ue
OS=debian
git clone https://github.com/justuswilhelm/kerneladmin.git "$HOME/kerneladmin" || echo "Already cloned"
cd "$HOME/kerneladmin"
printf "[$OS]\nlocalhost ansible_connection=local" > hosts
read -p "Git Username> " YOUR_GIT_NAME
read -p "Git Email> " YOUR_GIT_EMAIL
ansible-playbook site.yml -i hosts -kK \
-l $OS \
-e git_email="$YOUR_GIT_EMAIL" \
-e git_name="$YOUR_GIT_NAME"
)
sudo apt install ansible git
(
set -ue
OS=ubuntu
git clone https://github.com/justuswilhelm/kerneladmin.git "$HOME/kerneladmin" || echo "Already cloned"
cd "$HOME/kerneladmin"
printf "[$OS]\nlocalhost ansible_connection=local" > hosts
read -p "Git Username> " YOUR_GIT_NAME
read -p "Git Email> " YOUR_GIT_EMAIL
ansible-playbook site.yml -i hosts -kK \
-l $OS \
-e git_email="$YOUR_GIT_EMAIL" \
-e git_name="$YOUR_GIT_NAME"
)
Make sure to install
- Homebrew: https://brew.sh/, and
- Ansible: https://www.ansible.com/
Homebrew can be installed by running
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Ansible can be installed by running
brew install ansible
Having trouble with XCode? Run this in your Terminal:
sudo xcodebuild -license accept
Then, run the following in your terminal
(
set -ue
OS=ubuntu
git clone https://github.com/justuswilhelm/kerneladmin.git "$HOME/kerneladmin" || echo "Already cloned"
cd "$HOME/kerneladmin"
printf "[$OS]\nlocalhost ansible_connection=local" > hosts
read -p "Git Username> " YOUR_GIT_NAME
read -p "Git Email> " YOUR_GIT_EMAIL
ansible-playbook site.yml -i hosts -kK \
-l $OS \
-e git_email="$YOUR_GIT_EMAIL" \
-e git_name="$YOUR_GIT_NAME"
)
Rerun the installation anytime after that by just typing
ansible-playbook $HOME/kerneladmin/site.yml -i $HOME/kerneladmin/hosts -kK
