On this page
rabbitmq_user – Manage RabbitMQ users
Synopsis
- Add or remove users to RabbitMQ and assign permissions
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
configure_priv
-
|
Default:
"^$"
|
Regular expression to restrict configure actions on a resource for the specified vhost.
By default all actions are restricted.
This option will be ignored when permissions option is used.
|
force
boolean
|
|
Deletes and recreates the user.
|
node
-
|
Default:
"rabbit"
|
erlang node name of the rabbit we wish to configure
|
password
-
|
Password of user to add.
To change the password of an existing user, you must also specify update_password=always .
|
|
permissions
-
|
Default:
[]
|
a list of dicts, each dict contains vhost, configure_priv, write_priv, and read_priv, and represents a permission rule for that vhost.
This option should be preferable when you care about all permissions of the user.
You should use vhost, configure_priv, write_priv, and read_priv options instead if you care about permissions for just some vhosts.
|
read_priv
-
|
Default:
"^$"
|
Regular expression to restrict configure actions on a resource for the specified vhost.
By default all actions are restricted.
This option will be ignored when permissions option is used.
|
state
-
|
|
Specify if user is to be added or removed
|
tags
-
|
User tags specified as comma delimited
|
|
update_password
-
added in 2.6
|
|
on_create will only set the password for newly created users. always will update passwords if they differ.
|
user
- / required
|
Name of user to add
aliases: username, name |
|
vhost
-
|
Default:
"/"
|
vhost to apply access privileges.
This option will be ignored when permissions option is used.
|
write_priv
-
|
Default:
"^$"
|
Regular expression to restrict configure actions on a resource for the specified vhost.
By default all actions are restricted.
This option will be ignored when permissions option is used.
|
Examples
# Add user to server and assign full access control on / vhost.
# The user might have permission rules for other vhost but you don't care.
- rabbitmq_user:
user: joe
password: changeme
vhost: /
configure_priv: .*
read_priv: .*
write_priv: .*
state: present
# Add user to server and assign full access control on / vhost.
# The user doesn't have permission rules for other vhosts
- rabbitmq_user:
user: joe
password: changeme
permissions:
- vhost: /
configure_priv: .*
read_priv: .*
write_priv: .*
state: present
Status
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors
- Chris Hoffman (@chrishoffman)
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.8/modules/rabbitmq_user_module.html