ceph-volume: adds a dmcrypt param to the ceph_volume module

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
pull/2351/head
Andrew Schoen 2018-01-19 09:43:48 -06:00 committed by Guillaume Abrioux
parent 5bf5642556
commit 965d296565
1 changed files with 9 additions and 0 deletions

View File

@ -77,6 +77,10 @@ options:
description:
- Will set the crush device class for the OSD.
required: false
dmcrypt:
description:
- If set to True the OSD will be encrypted with dmcrypt.
required: false
author:
@ -147,6 +151,7 @@ def run_module():
wal=dict(type='str', required=False),
wal_vg=dict(type='str', required=False),
crush_device_class=dict(type='str', required=False),
dmcrypt=dict(type='bool', required=False, default=False),
)
module = AnsibleModule(
@ -166,6 +171,7 @@ def run_module():
wal = module.params.get('wal', None)
wal_vg = module.params.get('wal_vg', None)
crush_device_class = module.params.get('crush_device_class', None)
dmcrypt = module.params['dmcrypt']
cmd = [
'ceph-volume',
@ -195,6 +201,9 @@ def run_module():
if crush_device_class:
cmd.extend(["--crush-device-class", crush_device_class])
if dmcrypt:
cmd.append("--dmcrypt")
result = dict(
changed=False,
cmd=cmd,