ansible / ansible.builtin / v2.3.3.0-1 / module / rabbitmq_user Adds or removes users to RabbitMQ | "added in version" 1.1 of ansible.builtin" Authors: "Chris Hoffman (@chrishoffman)" preview | supported by communityansible.builtin.rabbitmq_user (v2.3.3.0-1) — module
pip
Install with pip install ansible==2.3.3.0.post1
Add or remove users to RabbitMQ and assign permissions
# 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
node: default: rabbit description: - erlang node name of the rabbit we wish to configure required: false version_added: '1.2' version_added_collection: ansible.builtin tags: default: null description: - User tags specified as comma delimited required: false user: aliases: - username - name default: null description: - Name of user to add required: true force: choices: - 'yes' - 'no' default: 'no' description: - Deletes and recreates the user. required: false state: choices: - present - absent default: present description: - Specify if user is to be added or removed required: false vhost: default: / description: - vhost to apply access privileges. - This option will be ignored when permissions option is used. required: false password: default: null description: - Password of user to add. - To change the password of an existing user, you must also specify C(force=yes). required: false read_priv: default: ^$ description: - 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. required: false write_priv: default: ^$ description: - 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. required: false permissions: default: [] description: - 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. required: false configure_priv: default: ^$ description: - 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. required: false