Last active
November 19, 2018 10:05
-
-
Save mashimom/1fd1661e6efc2609f11cdab8aaacedee to your computer and use it in GitHub Desktop.
Install Ansible on Ubuntu
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
#!/bin/sh | |
sudo apt install python-setuptools python-dev build-essential | |
sudo easy_install pip | |
sudo pip 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 " command: ansible-vault create ~/.ansible/hosts/host_vars/localhost" | |
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