Ansible Roles
Collect Ansible roles for automatical deployment.
Requirements
-
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
-
All roles are developed base on CentOS 6.7, ensure remoted machines have the same OS.
Usage
-
Modify your Ansbile playbook as needed.
Playbook Example:
--- - hosts: servers roles: - { role: dropwizard-api, become: yes } - { role: hubot, become: yes }
-
To run the Ansbile playbook, simply execute the following command:
ansible-playbook -i inventory example-main.yml
Main Roles List
-
- Description: Create user and group for the API. Also, deploy the API repo to certain directories.
-
- Description: Generate / refresh certificates and backup old certificates.
-
- Description: Install Elasticsearch and ensure the service is running.