Ansible roles / playbooks to setup some tools like Docker, Jenkins, and etc. on Linux machine. Currently only support Ubuntu 14.04.
-
Copy your SSH public key (if you don't have one, follow this guideline and create one)
$ cat ~/.ssh/id_rsa.pub | pbcopy
-
Run and log in the VM via SSH
$ vagrant up $ vagrant ssh
-
Add your SSH key to
~/.ssh/authorized_keys
-
Log out the VM and run any Ansible playbook you like (feel free to modify inventory file as needed)
$ ansible-playbook docker-jenkins.yml -i inventory
Since the ansible-playbook is also defined in Vagrantfile provision block, we can run the ansible-playbook when the VM first starts:
$ vagrant up
or do provision whenever you want run the playbook via vagrant:
$ vagrant provision