rabbitmq/README.md
2023-02-08 01:38:33 +03:00

135 lines
3.0 KiB
Markdown

# RabbitMQ Ansible Role
## Version
Set the `rabbitmq_version` and `erlang_version` variables to define the version of RabbitMQ and Erlang to install.
```yaml
rabbitmq_version: 3.9.8
erlang_version: 24.1.3
```
## Users
Set the `rabbitmq_users` variable to define an array of present users.
```yaml
rabbitmq_users:
- user: admin
password: admin
tags: administrator
```
| parameter | required | default | choices | comments |
| -------------- | -------- | ------- | ------- | -------- |
| configure_priv | no | .* | | |
| password | yes | | | |
| read_priv | no | .* | | |
| tags | no | | | |
| user | yes | | | |
| vhost | no | / | | |
| write_priv | no | .* | | |
### Remove Users
Set the `rabbitmq_users_absent` variable to define an array of absent users.
```yaml
rabbitmq_users_absent:
- guest
```
## Policies
Set the `rabbitmq_policies` variable to define policies
```yaml
rabbitmq_policies:
- name: HA
pattern: .*
tags:
ha-mode: exactly
ha-params: 2
```
## Virtual Hosts
Set the `rabbitmq_vhosts` variable to define an array of present virtual hosts.
```yaml
rabbitmq_vhosts:
- /one
- name: /two
node: rabbit
tracing: no
```
| parameter | required | default | choices | comments |
| ---------- | -------- | ------- | -------------------------------- | -------- |
| name | yes | | | |
| node | no | rabbit | | |
| tracing | no | no | <ul><li>yes</li><li>no</li></ul> | |
### Remove Virtual Hosts
Set the `rabbitmq_vhosts_absent` variable to define an array of absent virtual hosts.
```yaml
rabbitmq_vhosts_absent:
- /vhost
```
## Plugins
Set the `rabbitmq_plugins` variable to define an array of enabled plugins.
```yaml
rabbitmq_plugins:
- rabbitmq_management
- name: rabbitmq_delayed_message_exchange
url: http://www.rabbitmq.com/community-plugins/v3.6.x/rabbitmq_delayed_message_exchange-0.0.1.ez
```
| parameter | required | default | choices | comments |
| --------- | -------- | ------- | ------- | ------------------- |
| name | yes | | | |
| url | no | | | Installs the plugin |
### Disable Plugins
Set the `rabbitmq_plugins_disabled` variable to disable plugins.
```yaml
rabbitmq_plugins_disabled:
- rabbitmq_management
```
## Configuration
Set the `rabbitmq_conf` variable to define the configuration.
```yaml
rabbitmq_conf: |
option = value
```
## Cluster
Set the `rabbitmq_cluster` variable to enable clustering.
```yaml
rabbitmq_cluster: yes
```
### Erlang Cookie
Set the `rabbitmq_erlang_cookie` variable to define the Erlang cookie.
```yaml
rabbitmq_erlang_cookie: g9avtqdzdm2p5oe9
```
## License
MIT