ericjarvies
12/12/2016 - 6:02 AM

ansible

ansible

check if developer tools are installed;

pkgutil --pkg-info=com.apple.pkg.CLTools_Executables

install pip;

sudo easy_install pip

install ansible;

sudo pip install ansible

upgrade ansible;

sudo pip install ansible --upgrade

set ansible environment variable in .zshrc;

export ANSIBLE_HOSTS=/etc/ansible/hosts

or specificy ansible hosts location with "inventory-file=" command;

ansible all --inventory-file=/etc/ansible/hosts -m ping

add servers to connect to in hosts file;

sudo nano /etc/ansible/hosts

nyc vpn_ip=10.0.0.1 ansible_host=139.59.14.89

generate ssh key on the workstation (master) node;

ssh-keygen -t rsa -C "alpha@imac.local"

copy the key to the remote server(s)/node(s);

ssh-copy-id alpha@nyc

test connections;

ansible all -m ping