X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=README.md;h=15f9cdf38d2ce9cc5fee633b352662483d106265;hb=refs%2Fheads%2Ffretlink-fixes;hp=03cd1aa57509034848962dba3a016f81938f4b00;hpb=da8e343df912e94703a8094f5e62d4c1bcc57345;p=github%2Ffretlink%2Fansible-rabbitmq.git diff --git a/README.md b/README.md index 03cd1aa..15f9cdf 100644 --- a/README.md +++ b/README.md @@ -1,118 +1,73 @@ -Role Name -========= + + +**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* -Installs rabbitmq https://www.rabbitmq.com/ (Configurable...HA and Clustering ready) +- [ansible-rabbitmq](#ansible-rabbitmq) + - [Build Status](#build-status) + - [Requirements](#requirements) + - [Vagrant](#vagrant) + - [Role Variables](#role-variables) + - [Dependencies](#dependencies) + - [Example Playbook](#example-playbook) + - [License](#license) + - [Author Information](#author-information) -Requirements ------------- + -Ensure hostnames are resolvable prior to clustering...either update /etc/hosts or ensure DNS is working. +# ansible-rabbitmq -Vagrant -------- +An [Ansible](https://www.ansible.com) role to install/configure [RabbitMQ](https://www.rabbitmq.com/) -Spin up a 3 node HA Cluster for testing... -Install Ansible role on your host: -```` +## Build Status + +[![Build Status](https://travis-ci.org/mrlesmithjr/ansible-rabbitmq.svg?branch=master)](https://travis-ci.org/mrlesmithjr/ansible-rabbitmq) + +## Requirements + +Ensure hostnames are resolvable prior to clustering...either update /etc/hosts +or ensure DNS is working. + +## Vagrant + +Spin up a 3 node HA Cluster for testing... +Install Ansible role on your host: + +```bash sudo ansible-galaxy install -r requirements.yml -f -```` -Now spin up your environment... -```` +``` + +Now spin up your environment... + +```bash vagrant up -```` -When you are done testing, tear it all down... -```` +``` + +When you are done testing, tear it all down... + +```bash ./cleanup.sh -```` - -Role Variables --------------- - -```` ---- -# defaults file for ansible-rabbitmq -rabbitmq_config_ha: false #defines if rabbitmq ha should be configured...define here or in group_vars/group -rabbitmq_enable_clustering: false #defines if setting up a rabbitmq cluster...define here or in group_vars/group -rabbitmq_erlang_cookie: 'LSKNKBELKPSTDBBCHETL' #define erlang cookie for cluster...define here or in group_vars/group -rabbitmq_erlang_cookie_file: '/var/lib/rabbitmq/.erlang.cookie' -rabbitmq_config: - - queue_name: logstash - durable: true - exchange_name: logstash - type: direct - routing_key: logstash - tags: 'ha-mode=all,ha-sync-mode=automatic' -rabbitmq_debian_repo: 'deb http://www.rabbitmq.com/debian/ testing main' -rabbitmq_debian_repo_key: 'http://www.rabbitmq.com/rabbitmq-signing-key-public.asc' -rabbitmq_master: [] #defines the inventory host that should be considered master...define here or in group_vars/group -rabbitmq_redhat_repo_key: 'https://www.rabbitmq.com/rabbitmq-signing-key-public.asc' -rabbitmq_redhat_package: 'rabbitmq-server-{{ rabbitmq_redhat_version }}-1.noarch.rpm' -rabbitmq_redhat_url: 'http://www.rabbitmq.com/releases/rabbitmq-server/v{{ rabbitmq_redhat_version }}' -rabbitmq_redhat_version: '3.6.1' -rabbitmq_users: #define admin user to create in order to login to WebUI - - name: rabbitmqadmin - password: rabbitmqadmin - vhost: / - configure_priv: '.*' - read_priv: '.*' - write_priv: '.*' - tags: 'administrator' #define comma separated list of tags to assign to user....management,policymaker,monitoring,administrator...required for management plugin. https://www.rabbitmq.com/management.html -```` - -example... -group_vars/rabbitmq-cluster-nodes -```` ---- -rabbitmq_enable_clustering: true -rabbitmq_config_ha: false -rabbitmq_master: ans-test-1 -```` - -Dependencies ------------- +``` + +## Role Variables + +[Role Defaults](./defaults/main.yml) + +## Dependencies None -Example Playbook ----------------- - -```` ---- -- hosts: all - become: true - vars: - - pri_domain_name: 'test.vagrant.local' - roles: - tasks: - - name: updating /etc/hosts - lineinfile: - dest: /etc/hosts - regexp: "^{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}" - line: "{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}" - state: present - with_items: groups['all'] - -- hosts: all - become: true - vars: - - rabbitmq_config_ha: true - - rabbitmq_enable_clustering: true - - pri_domain_name: 'test.vagrant.local' - - rabbitmq_master: 'node0' - roles: - - role: ansible-rabbitmq - tasks: -```` - -License -------- - -BSD - -Author Information ------------------- +## Example Playbook + +[Example Playbook](./playbook.yml) + +## License + +MIT + +## Author Information Larry Smith Jr. -- @mrlesmithjr -- http://everythingshouldbevirtual.com -- mrlesmithjr [at] gmail.com + +- [@mrlesmithjr](https://www.twitter.com/mrlesmithjr) +- [EverythingShouldBeVirtual](http://everythingshouldbevirtual.com) +- [mrlesmithjr@gmail.com](mailto:mrlesmithjr@gmail.com)