Ansible install
From wikinotes
Ansible expects remote machines to share a similar environment to the machine you are using to control them. Every controlled machine must have a python interpreter, and it would be the best practice to manually define where each OS stores it's python interpreter. At this time, ansible requires python 2.x.
Linux
BSD
Locations /usr/share/examples/ansible/*
example hosts/ansible.cfg configs /usr/local/etc/ansible/hosts
defines machines to be controlled by ansible /usr/local/etc/ansible/ansible.cfg
setup ansible to control localhost
sudo pkg install ansible sudo pip2 install cryptography
/usr/local/etc/ansible/hosts
[freebsd] 127.0.0.1 [freebsd:vars] ansible_python_interpreter=/usr/local/bin/python2ssh-keygen -t ecdsa -b 521 # create ssh key cat $HOME/.ssh/id_ecdsa.pub >> $HOME/.ssh/authorized_keys # add yourself to allowed ssh users sudo service sshd restart # reload sshd with new configtest install
ansible all -m ping # test that you can ping all entries in hosts file. ansible all -a '/bin/echo hello' # run command on all hosts