From 875e14cabf7206c12d7808261bada31d3dd8939d Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Thu, 11 Jan 2018 10:56:39 -0600 Subject: [PATCH] ceph_volume: adds the crush_device_class param Signed-off-by: Andrew Schoen --- library/ceph_volume.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/library/ceph_volume.py b/library/ceph_volume.py index 699631cdd..ccbcc5a51 100644 --- a/library/ceph_volume.py +++ b/library/ceph_volume.py @@ -73,6 +73,10 @@ options: - If wal is a lv, this must be the name of the volume group it belongs to. - Only applicable if objectstore is 'bluestore'. required: false + crush_device_class: + description: + - Will set the crush device class for the OSD. + required: false author: @@ -142,6 +146,7 @@ def run_module(): db_vg=dict(type='str', required=False), wal=dict(type='str', required=False), wal_vg=dict(type='str', required=False), + crush_device_class=dict(type='str', required=False), ) module = AnsibleModule( @@ -160,6 +165,7 @@ def run_module(): db_vg = module.params.get('db_vg', None) wal = module.params.get('wal', None) wal_vg = module.params.get('wal_vg', None) + crush_device_class = module.params.get('crush_device_class', None) cmd = [ 'ceph-volume', @@ -186,6 +192,9 @@ def run_module(): wal = get_wal(wal, wal_vg) cmd.extend(["--block.wal", wal]) + if crush_device_class: + cmd.extend(["--crush-device-class", crush_device_class]) + result = dict( changed=False, cmd=cmd,