Skip to content
The repository where I collect all my Ansible playbooks, roles, Vagrantfile, etc.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
roles
.gitignore
LICENSE
README.md
Vagrantfile
ansible.cfg
docker-jenkins.yml
inventory
jenkins-ansible-lint.yml
playbook_example.yml

README.md

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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.