INACTIVE - A playbook to install and configure RabbitMQ.
Перейти к файлу
Mayeu 4373e3229e Merge pull request 22
Add the possibility to override the Virtualbox name for test.

Conflicts:
	Vagrantfile
2014-11-06 15:41:47 +01:00
defaults Add support for the Debian official package. Close #11 2014-11-06 15:31:01 +01:00
files Revert "Add the dummy certificate" 2013-12-02 10:09:50 +01:00
handlers Rabbit doesn't enable itself on boot 2014-10-10 16:56:57 -07:00
meta Add a category to the playbook 2014-02-14 18:21:46 +01:00
tasks Add support for the Debian official package. Close #11 2014-11-06 15:31:01 +01:00
templates Merge branch 'pr_8' 2014-10-30 16:20:36 +01:00
vagrant Flush handlers before tests begin + rebase 2014-10-30 13:50:55 -07:00
.gitignore Updated to integrate with vagrant cleaner 2014-09-21 12:59:35 -07:00
CHANGELOG.md Add a section about installation and versionning in the README 2014-10-30 16:54:07 +01:00
README.md Add support for the Debian official package. Close #11 2014-11-06 15:31:01 +01:00
Vagrantfile Merge pull request 22 2014-11-06 15:41:47 +01:00

README.md

Rabbitmq Playbook

Playbook to install and configure rabbitmq. Will come with various configuration tweaking later on.

If you wish to discuss modifications, or help to support more platforms, open an issue.

Installation

Use Ansible galaxy to install this playbook:

$ ansible-galaxy install Mayeu.rabbitmq,1.1.0

The master branch should currently be considered instable. Please avoid using it for something else than test purpose :)

Supported system

Currently only Debian Jessie and Wheezy on amd64 are supported. Patch welcome to support other distribution or OS.

Semantic versioning 2.0.0

Starting with the commit 67c608826a140868a71854ce3129b5f3d67ddcce, this playbook use semantic versioning. Following the specification, and since the playbook is used in production and I want to avoid breaking the compatibility, the first version number is 1.0.0

The public API defined in the semantic versioning correspond to the settings available to the user. Breaking the API (incrementing from X.Y.Z to (X+1).Y.Z) in this context mean that the user need to change variable name for its playbook to run.

Any new feature added (from X.Y.Z to X.(Y+1).Z) should have a working default value that need no user interaction by default. If a feature addition require user interaction, then it is not a minor upgrade, but a major one.

Role Variables

Installation

Name Type Description Default
rabbitmq_os_package Bool When true uses the default package proposed by the OS or distribution instead of the one distributed by RabbitMQ. false

Environment

Name Type Description Default
rabbitmq_conf_env Hash Set environment variable undef

Exemple:

rabbitmq_conf_env:
  RABBITMQ_ROCKS: correct

Will generate:

RABBITMQ_ROCKS="correct"

Certificate

Name Type Description Default
rabbitmq_cacert String Name of the CA certificate file. Will be prefixed by rabbitmq_ and postfixed by .pem cacert
rabbitmq_server_key String Name of the SSL key file. Will be prefixed by rabbitmq_ and postfixed by .pem server_key
rabbitmq_server_cert String Name of the SSL certificate file. Will be prefixed by rabbitmq_ and postfixed by .pem server_cert
rabbitmq_ssl Boolean Define if we need to use SSL true

Default configuration file

Name Type Description Default
rabbitmq_conf_tcp_listeners_address String listening address for the tcp interface ''
rabbitmq_conf_tcp_listeners_port Integer listening port for the tcp interface 5672
rabbitmq_conf_ssl_listeners_address String listening address for the ssl interface '0.0.0.0'
rabbitmq_conf_ssl_listeners_port Integer listening port for the ssl interface 5671
rabbitmq_conf_ssl_options_cacertfile String Path the CA certificate "/etc/rabbitmq/ssl/cacert.pem"
rabbitmq_conf_ssl_options_certfile String Path to the server certificate "/etc/rabbitmq/ssl/server_cert.pem"
rabbitmq_conf_ssl_options_keyfile String Path to the private key file "/etc/rabbitmq/ssl/server_key.pem"
rabbitmq_conf_ssl_options_fail_if_no_peer_cert Boolean Value of the fail_if_no_peer_cert SSL option "true"

Plugins

Name Type Description Default
rabbitmq_new_only String Add plugins as new, without deactivating other plugins 'no'
rabbitmq_plugins String List List of plugins to activate

Vhost

Name Type Description Default
rabbitmq_vhost_definitions List Define the list of vhost to create []
rabbitmq_users_definitions List of hash Define the users, and associated vhost and password (see below) []

Defining the vhosts configuration

rabbitmq_vhost_definitions:
  - name:    vhost1
    node:    node_name #Optionnal, default to "rabbit"
    tracing: yes       #Optionnal, default to "no"

Defining the users configuration:

rabbitmq_users_definitions:
  - vhost:    vhost1
    user:     user1
    password: password1
    node:     node_name  # Optionnal, default to "rabbit"
  - vhost:    vhost1
    user:     user2
    password: password2
    force:    no
    tags:                # Optionnal, user tags
    - administrator

Federation

Name Type Description Default
rabbitmq_federation Boolean Define if we need to setup federation false
rabbitmq_federation_configuration List of hashes Define all the federation we need to setup Not defined
rabbitmq_policy_configuration List of hashes Define all the federation we need to setup Not defined

Defining the federation upstream configuration:

rabbitmq_federation_upstream:
  - name: upstream name
    vhost: local vhost to federate
    value: json description of the federation
    local_username: the local username for the federation

See the RabbitMQ documentation for the possible JSON value.

Defining the policy configuration:

rabbitmq_policy_configuration:
  - name: name of the policy
    vhost: vhost where the policy will be applied
    pattern: pattern of the policy
    tags: description of the policy in dict form # exemple: "ha-mode=all"

Files required

You have to put the needed certificates in your files/ folder:

files/
 |- rabbitmq_{{ rabbitmq_cacert }}.pem
 |- rabbitmq_{{ rabbitmq_server_key }}.pem
 |- rabbitmq_{{ rabbitmq_server_cert }}.pem

License

BSD