FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects

El9

Open Gwen Dawes requested to merge el9 into master
1 file
+ 12
5
Compare changes
  • Side-by-side
  • Inline
@@ -20,7 +20,7 @@ description:
options:
target_type:
description:
- Lustre target type, choice of 'ost', 'mdt', 'mgs'.
- Lustre target type, choice of 'ost', 'mdt', 'mgs', or 'mdt mgs'.
required: yes
aliases: [target]
fsname:
@@ -186,7 +186,14 @@ class LDISKFS(object):
return
mkfs = self.module.get_bin_path(self.MKFS, required=True)
cmd = [mkfs, '--{}'.format(target_type)]
types=[]
if 'mdt' in target_type:
types += ['--mdt']
if 'mgs' in target_type:
types += ['--mgs']
if 'ost' in target_type:
types += ['--ost']
cmd = [mkfs] + types
if dryrun:
cmd.append("--dryrun")
@@ -246,7 +253,7 @@ def main():
# There is no "single command" to manipulate filesystems, so we map them all out and their options
module = AnsibleModule(
argument_spec=dict(
target_type=dict(required=True, aliases=['target'], choices=['ost','mdt','mgs']),
target_type=dict(required=True, aliases=['target'], choices=['ost','mdt','mgs','mdt mgs']),
dev=dict(required=True, aliases=['device']),
fsname=dict(required=True),
index=dict(type='int'),
@@ -346,10 +353,10 @@ def main():
# Create filesystem, depending on target type
if target_type == 'mgs':
filesystem.create_mgs()
elif (target_type == 'mdt') or (target_type == 'ost'):
elif ('mdt' in target_type) or (target_type == 'ost'):
filesystem.create()
else:
module.fail_json(msg="'%s' is not a supported target_type, choices are 'mgs', 'mdt', 'ost'" % (target_type), rc=rc, err=err)
module.fail_json(msg="'%s' is not a supported target_type, choices are 'mgs', 'mdt', 'ost', 'mdt mgs'" % (target_type), rc=rc, err=err)
changed = True
Loading