diff options
author | Fabio Alessandro Locati <me@fale.io> | 2016-12-01 13:59:53 +0000 |
---|---|---|
committer | John R Barker <john@johnrbarker.com> | 2016-12-01 13:59:53 +0000 |
commit | 061589187056fe786e5ed010a2e771f5b98f669e (patch) | |
tree | 07f6cdcbbe07ff40a16a47b6f842570f10dc19ed /messaging | |
parent | e7064125095503bffb8b11a2473ed285d257197d (diff) | |
download | ansible-modules-extras-061589187056fe786e5ed010a2e771f5b98f669e.tar.gz |
Native YAML - messaging (#3599)
Diffstat (limited to 'messaging')
-rw-r--r-- | messaging/rabbitmq_binding.py | 12 | ||||
-rw-r--r-- | messaging/rabbitmq_exchange.py | 8 | ||||
-rw-r--r-- | messaging/rabbitmq_parameter.py | 9 | ||||
-rw-r--r-- | messaging/rabbitmq_plugin.py | 4 | ||||
-rw-r--r-- | messaging/rabbitmq_policy.py | 12 | ||||
-rw-r--r-- | messaging/rabbitmq_queue.py | 9 | ||||
-rw-r--r-- | messaging/rabbitmq_user.py | 28 | ||||
-rw-r--r-- | messaging/rabbitmq_vhost.py | 4 |
8 files changed, 60 insertions, 26 deletions
diff --git a/messaging/rabbitmq_binding.py b/messaging/rabbitmq_binding.py index c1ca32a1..bc466388 100644 --- a/messaging/rabbitmq_binding.py +++ b/messaging/rabbitmq_binding.py @@ -94,10 +94,18 @@ options: EXAMPLES = ''' # Bind myQueue to directExchange with routing key info -- rabbitmq_binding: name=directExchange destination=myQueue type=queue routing_key=info +- rabbitmq_binding: + name: directExchange + destination: myQueue + type: queue + routing_key: info # Bind directExchange to topicExchange with routing key *.info -- rabbitmq_binding: name=topicExchange destination=topicExchange type=exchange routing_key="*.info" +- rabbitmq_binding: + name: topicExchange + destination: topicExchange + type: exchange + routing_key: *.info ''' import requests diff --git a/messaging/rabbitmq_exchange.py b/messaging/rabbitmq_exchange.py index 7b55b5c6..836db467 100644 --- a/messaging/rabbitmq_exchange.py +++ b/messaging/rabbitmq_exchange.py @@ -100,10 +100,14 @@ options: EXAMPLES = ''' # Create direct exchange -- rabbitmq_exchange: name=directExchange +- rabbitmq_exchange: + name: directExchange # Create topic exchange on vhost -- rabbitmq_exchange: name=topicExchange type=topic vhost=myVhost +- rabbitmq_exchange: + name: topicExchange + type: topic + vhost: myVhost ''' import requests diff --git a/messaging/rabbitmq_parameter.py b/messaging/rabbitmq_parameter.py index 90229109..602f92fc 100644 --- a/messaging/rabbitmq_parameter.py +++ b/messaging/rabbitmq_parameter.py @@ -63,10 +63,11 @@ options: EXAMPLES = """ # Set the federation parameter 'local_username' to a value of 'guest' (in quotes) -- rabbitmq_parameter: component=federation - name=local-username - value='"guest"' - state=present +- rabbitmq_parameter: + component: federation + name: local-username + value: '"guest"' + state: present """ class RabbitMqParameter(object): diff --git a/messaging/rabbitmq_plugin.py b/messaging/rabbitmq_plugin.py index b52de337..6aa4fac3 100644 --- a/messaging/rabbitmq_plugin.py +++ b/messaging/rabbitmq_plugin.py @@ -56,7 +56,9 @@ options: EXAMPLES = ''' # Enables the rabbitmq_management plugin -- rabbitmq_plugin: names=rabbitmq_management state=enabled +- rabbitmq_plugin: + names: rabbitmq_management + state: enabled ''' import os diff --git a/messaging/rabbitmq_policy.py b/messaging/rabbitmq_policy.py index a9207b3c..8293f6f8 100644 --- a/messaging/rabbitmq_policy.py +++ b/messaging/rabbitmq_policy.py @@ -74,13 +74,19 @@ options: EXAMPLES = ''' - name: ensure the default vhost contains the HA policy via a dict - rabbitmq_policy: name=HA pattern='.*' + rabbitmq_policy: + name: HA + pattern: .* args: tags: - "ha-mode": all + ha-mode: all - name: ensure the default vhost contains the HA policy - rabbitmq_policy: name=HA pattern='.*' tags="ha-mode=all" + rabbitmq_policy: + name: HA + pattern: .* + tags: + - ha-mode: all ''' class RabbitMqPolicy(object): def __init__(self, module, name): diff --git a/messaging/rabbitmq_queue.py b/messaging/rabbitmq_queue.py index afdd4103..7b0b69af 100644 --- a/messaging/rabbitmq_queue.py +++ b/messaging/rabbitmq_queue.py @@ -114,10 +114,15 @@ options: EXAMPLES = ''' # Create a queue -- rabbitmq_queue: name=myQueue +- rabbitmq_queue: + name: myQueue # Create a queue on remote host -- rabbitmq_queue: name=myRemoteQueue login_user=user login_password=secret login_host=remote.example.org +- rabbitmq_queue: + name: myRemoteQueue + login_user: user + login_password: secret + login_host: remote.example.org ''' import requests diff --git a/messaging/rabbitmq_user.py b/messaging/rabbitmq_user.py index 103650e2..470ae7c1 100644 --- a/messaging/rabbitmq_user.py +++ b/messaging/rabbitmq_user.py @@ -107,20 +107,26 @@ options: 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 +- 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 +- rabbitmq_user: + user: joe + password: changeme + permissions: + - vhost: / + configure_priv: .* + read_priv: .* + write_priv: .* + state: present ''' class RabbitMqUser(object): diff --git a/messaging/rabbitmq_vhost.py b/messaging/rabbitmq_vhost.py index dbde3239..1ffb3d26 100644 --- a/messaging/rabbitmq_vhost.py +++ b/messaging/rabbitmq_vhost.py @@ -55,7 +55,9 @@ options: EXAMPLES = ''' # Ensure that the vhost /test exists. -- rabbitmq_vhost: name=/test state=present +- rabbitmq_vhost: + name: /test + state: present ''' class RabbitMqVhost(object): |