mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Removes the createparent property.
The least surprising thing is to always create parents
This commit is contained in:
parent
7bb79093c2
commit
dc15c98e6f
1 changed files with 4 additions and 10 deletions
|
@ -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,8 +128,7 @@ 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:
|
||||||
cmd += ['-V', volsize]
|
cmd += ['-V', 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…
Add table
Reference in a new issue