Minimal scripts and files needed to allow ansible to manage a server.
ansible-bootstrap/
├── README.md
| This file
└── RUNME.sh
Standalone script that can be downloaded and run to configure a server to be managed by ansible
controller := the computer running the ansible-playbook command
controllee := the computer that ansible manages
This assumes you are setting up a Ubuntu 13.10 x64 to be managed by ansible.
-
Controller: Create a public/private key pair and copy it from the controller to the controllee's
/rootdirectoryssh-keygen -f ~/.ssh/ansible scp ~/.ssh/ansible.pub root@$MYSERVER:/root/ -
Controllee: As root, download and run
RUNME.shwget --no-check-certificate https://raw.githubusercontent.com/jdeveloperw/ansible-bootstrap/master/RUNME.sh sh RUNME.shNOTE: This will disable password-based on authentication on the controllee, requiring you to login to the controllee as
ansible@$MYSERVERusing the~/.ssh/ansibleprivate key. If you want to re-enable password-based authentication, edit/etc/ssh/sshd_config, replacingPasswordAuthentication nowith
PasswordAuthentication yes -
Controller: ssh to the controllee as ansible
ssh ansible@$MYSERVER -i ~/.ssh/ansible