Skip to content

Latest commit

 

History

History
63 lines (40 loc) · 1.69 KB

README.md

File metadata and controls

63 lines (40 loc) · 1.69 KB

My Ansible MIT licensed

Ansible roles / playbooks to setup some tools like Docker, Jenkins, and etc. on Linux machine. Currently only support Ubuntu 14.04.

Table of content

Vagrantfile

Ansible Roles

Ansible Playbooks

Usage - Locally

ansible-playbook

  1. Install Vagrant and Ansible on your local machine

  2. Copy your SSH public key (if you don't have one, follow this guideline and create one)

    $ cat ~/.ssh/id_rsa.pub | pbcopy
  3. Run and log in the VM via SSH

    $ vagrant up
    $ vagrant ssh
  4. Add your SSH key to ~/.ssh/authorized_keys

  5. 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

vagrant provision

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