Let someone specify a path to a Rabbit that's not installed in the usual place.
This commit is contained in:
parent
e0e50b5936
commit
9cc75f1f54
1 changed files with 12 additions and 2 deletions
|
@ -46,6 +46,11 @@ options:
|
|||
required: false
|
||||
default: enabled
|
||||
choices: [enabled, disabled]
|
||||
path:
|
||||
description:
|
||||
- Specify a custom path 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['path']:
|
||||
self._rabbitmq_plugins = module.params['path'] + "/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']),
|
||||
path=dict(required=False, default=None)
|
||||
)
|
||||
module = AnsibleModule(
|
||||
argument_spec=arg_spec,
|
||||
|
|
Loading…
Reference in a new issue