Skip to content

Instantly share code, notes, and snippets.

@mashimom
Created June 12, 2018 15:43
Show Gist options
  • Save mashimom/54dee4b45e0896fcc4e4b8c22be0c0cd to your computer and use it in GitHub Desktop.
Save mashimom/54dee4b45e0896fcc4e4b8c22be0c0cd to your computer and use it in GitHub Desktop.
#!/bin/sh
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible
mkdir -p ~/.ansible/{host_vars,group_vars,roles}
wget -O ~/.ansible.cfg https://raw.githubusercontent.com/ansible/ansible/devel/examples/ansible.cfg
touch ~/.ansible/hosts
echo "[all]" >> ~/.ansible/hosts
echo "localhost ansible_connection=local" >> ~/.ansible/hosts
touch ~/.ansible/host_vars/localhost
echo "Edit ~/.ansible.cfg: set hosts file, roles dir"
echo "Now edit YAML ~/.ansible/hosts/host_vars/localhost and insert ansible_become_pass entry."
echo "Should be ready for first run"
echo export EDITOR=`which nano` >> ~/.zshrc #set your profile and prefered editor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment