Removes the createparent property.

The least surprising thing is to always create parents
pull/18777/head
Johan Wirén 9 years ago committed by Matt Clay
parent 7bb79093c2
commit dc15c98e6f

@ -33,7 +33,9 @@ options:
required: true required: true
state: state:
description: description:
- Whether to create (C(present)), or remove (C(absent)) a file system, snapshot or volume. - Whether to create (C(present)), or remove (C(absent)) a
file system, snapshot or volume. All parents/children
will be created/destroyed as needed to reach the desired state.
choices: ['present', 'absent'] choices: ['present', 'absent']
required: true required: true
origin: origin:
@ -41,11 +43,6 @@ options:
- Snapshot from which to create a clone - Snapshot from which to create a clone
default: null default: null
required: false required: false
createparent:
description:
- Creates all non-existing parent file systems.
required: false
default: "on"
key_value: key_value:
description: description:
- The C(zfs) module takes key=value pairs for zfs properties to be set. See the zfs(8) man page for more information. - The C(zfs) module takes key=value pairs for zfs properties to be set. See the zfs(8) man page for more information.
@ -119,7 +116,6 @@ class Zfs(object):
volsize = properties.pop('volsize', None) volsize = properties.pop('volsize', None)
volblocksize = properties.pop('volblocksize', None) volblocksize = properties.pop('volblocksize', None)
origin = properties.pop('origin', None) origin = properties.pop('origin', None)
createparent = self.module.params.get('createparent')
cmd = [self.zfs_cmd] cmd = [self.zfs_cmd]
if "@" in self.name: if "@" in self.name:
@ -132,7 +128,6 @@ class Zfs(object):
cmd.append(action) cmd.append(action)
if action in ['create', 'clone']: if action in ['create', 'clone']:
if createparent:
cmd += ['-p'] cmd += ['-p']
if volsize: if volsize:
@ -201,7 +196,6 @@ def main():
argument_spec = dict( argument_spec = dict(
name = dict(type='str', required=True), name = dict(type='str', required=True),
state = dict(type='str', required=True, choices=['present', 'absent']), state = dict(type='str', required=True, choices=['present', 'absent']),
createparent = dict(type='bool', required=False, default=True),
), ),
supports_check_mode=True, supports_check_mode=True,
check_invalid_arguments=False check_invalid_arguments=False

Loading…
Cancel
Save