Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save phanngoc/0e30e996793a859538b9664b61c48ed2 to your computer and use it in GitHub Desktop.
Save phanngoc/0e30e996793a859538b9664b61c48ed2 to your computer and use it in GitHub Desktop.
How to Install Ansible Ubuntu 16.04 LTS?
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible

sudo echo "[localhost]" > ~/ansible_hosts
sudo echo "localhost ansible_connection=local" >> ~/ansible_hosts
sudo vim /etc/ansible/hosts 
[127.0.0.1]
127.0.0.1 ansible_connection=local

[localhost]
127.0.0.1 ansible_connection=local


ansible -m ping all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment