From: Andrew Schoen Date: Fri, 19 Jan 2018 15:43:48 +0000 (-0600) Subject: ceph-volume: adds a dmcrypt param to the ceph_volume module X-Git-Tag: v3.1.0beta3~42 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=965d2965655c21f4f90cb2a45a3f0cd65e048979;p=ceph-ansible.git ceph-volume: adds a dmcrypt param to the ceph_volume module Signed-off-by: Andrew Schoen --- diff --git a/library/ceph_volume.py b/library/ceph_volume.py index ccbcc5a51..b51821291 100644 --- a/library/ceph_volume.py +++ b/library/ceph_volume.py @@ -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,