/ansible-roles

Primary LanguageShellApache License 2.0Apache-2.0

Ansible Roles

Collect Ansible roles for automatical deployment.

Requirements


  1. Ansible (version 2.1) should be installed first. In addition, we should also prepare an Ansible inventory file to run this playbook.

    Inventory File Example:

    [servers]
    servers ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user=vagrant ansible_ssh_private_key_file=.vagrant/machines/default/virtualbox/private_key
    
  2. All roles are developed base on CentOS 6.7, ensure remoted machines have the same OS.

Usage


  1. Modify your Ansbile playbook as needed.

    Playbook Example:

    ---
    - hosts: servers
      roles:
        - { role: dropwizard-api, become: yes }
    	- { role: hubot, become: yes }
  2. To run the Ansbile playbook, simply execute the following command:

    ansible-playbook -i inventory example-main.yml

Main Roles List


  • dropwizard-api

    • Description: Create user and group for the API. Also, deploy the API repo to certain directories.
  • keytools

    • Description: Generate / refresh certificates and backup old certificates.
  • elasticsearch

    • Description: Install Elasticsearch and ensure the service is running.