ansible

Configure ansible console

#install ansible itself and create a local ansible user
# TODO check to see if ansible install adds user
sudo apt-get install ansible
adduser ansible
sudo -i -u ansible
ssh-keygen

#create a remote ansible user
ssh somebox
adduser ansbile
sudo visudo
...
...
allen ALL=(ALL) NOPASSWD:ALL

ssh-copy-id somebox


# configure local hosts file for quick testing
sudo vim /etc/hosts
  192.168.0.2 somehost

# configure ansible hosts

sudo vim /etc/ansible/hosts
...
...
somebox


# and test

ansible all -m ping
ansible all -m ping --sudo
ansible all -a "/bin/echo hello"





Comments