ceph_volume: adds the cluster param

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
pull/2245/head
Andrew Schoen 2017-12-01 08:40:33 -06:00 committed by Sébastien Han
parent 423166f671
commit 7721aa375e
1 changed files with 9 additions and 0 deletions

View File

@ -19,6 +19,11 @@ description:
- Only available in ceph versions luminous or greater. - Only available in ceph versions luminous or greater.
options: options:
cluster:
description:
- The ceph cluster name.
required: false
default: ceph
subcommand: subcommand:
description: description:
- The ceph-volume subcommand to use. - The ceph-volume subcommand to use.
@ -102,6 +107,7 @@ from ansible.module_utils.basic import AnsibleModule
def run_module(): def run_module():
module_args = dict( module_args = dict(
cluster=dict(type='str', required=False, default='ceph'),
subcommand=dict(type='str', required=False, default='lvm'), subcommand=dict(type='str', required=False, default='lvm'),
objectstore=dict(type='str', required=True), objectstore=dict(type='str', required=True),
data=dict(type='str', required=True), data=dict(type='str', required=True),
@ -119,6 +125,7 @@ def run_module():
supports_check_mode=True supports_check_mode=True
) )
cluster = module.params['cluster']
subcommand = module.params['subcommand'] subcommand = module.params['subcommand']
objectstore = module.params['objectstore'] objectstore = module.params['objectstore']
data = module.params['data'] data = module.params['data']
@ -132,6 +139,8 @@ def run_module():
cmd = [ cmd = [
'ceph-volume', 'ceph-volume',
'--cluster',
cluster,
subcommand, subcommand,
'create', 'create',
'--%s' % objectstore, '--%s' % objectstore,