1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #3485 from frankshearar/let-rabbitmq-plugin-module-use-nonstandard-path

Let rabbitmq plugin module use nonstandard path
This commit is contained in:
Michael DeHaan 2013-07-20 09:05:54 -07:00
commit 8df6b48e6b

View file

@ -42,10 +42,15 @@ options:
choices: [ "yes", "no" ]
state:
description:
- Specify if pluginss are to be enabled or disabled
- Specify if plugins are to be enabled or disabled
required: false
default: enabled
choices: [enabled, disabled]
prefix:
description:
- Specify a custom prefix to a Rabbit
required: false
default: null
'''
EXAMPLES = '''
@ -56,6 +61,10 @@ EXAMPLES = '''
class RabbitMqPlugins(object):
def __init__(self, module):
self.module = module
if module.params['prefix']:
self._rabbitmq_plugins = module.params['prefix'] + "/sbin/rabbitmq-plugins"
else:
self._rabbitmq_plugins = module.get_bin_path('rabbitmq-plugins', True)
def _exec(self, args, run_in_check_mode=False):
@ -78,7 +87,8 @@ def main():
arg_spec = dict(
names=dict(required=True, aliases=['name']),
new_only=dict(default='no', type='bool'),
state=dict(default='enabled', choices=['enabled', 'disabled'])
state=dict(default='enabled', choices=['enabled', 'disabled']),
prefix=dict(required=False, default=None)
)
module = AnsibleModule(
argument_spec=arg_spec,