Created
March 18, 2014 03:46
-
-
Save rektide/9613213 to your computer and use it in GitHub Desktop.
rabbitmq one-act
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
vars_prompt: | |
vhost: "Vhost name (optional)" | |
user: "User" | |
pw: "Optional password" | |
vars: | |
config_priv: ".*" | |
read_priv: ".*" | |
write_priv: ".*" | |
tasks: | |
- fail: msg="User required" | |
when: user is not defined or not user | |
- rabbitmq_vhost: name="{{vhost}}" state=present | |
when: not not vhost | |
- set_fact: vhost="/" | |
when: not vhost | |
- rabbitmq_user: read_priv="{{read_priv}}" write_priv="{{write_priv}}" configure_priv="{{config_priv}}" user="{{user}}" vhost="{{vhost}}" password="{{pw}}" | |
when: not not pw | |
- rabbitmq_user: read_priv="{{read_priv}}" write_priv="{{write_priv}}" configure_priv="{{config_priv}}" user="{{user}}" vhost="{{vhost}}" | |
when: not pw |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment