]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-volume: adds a dmcrypt param to the ceph_volume module
authorAndrew Schoen <aschoen@redhat.com>
Fri, 19 Jan 2018 15:43:48 +0000 (09:43 -0600)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 24 Jan 2018 13:10:08 +0000 (14:10 +0100)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
library/ceph_volume.py

index ccbcc5a510130905d88c8155f941db7e867854d2..b5182129117e91bbf59e03b738949e3d12981d4b 100644 (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,