blue119 / my-ansible

The repository where I collect all my Ansible playbooks, roles, Vagrantfile, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

The repository where I collect all my Ansible playbooks, roles, Vagrantfile, etc.

License:MIT License


Languages

Language:Groovy 100.0%