mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* vdo: add force option
* Add changelog
* Improve the diff the next time something is added :)
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add warning text placeholder by felixfontein
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add warning text
* Apply suggestion for warning text from rhawalsh
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 73bb0f1900
)
Co-authored-by: Amin Vakil <info@aminvakil.com>
This commit is contained in:
parent
ef304ed824
commit
0d28bfb67e
2 changed files with 20 additions and 1 deletions
3
changelogs/fragments/2110-vdo-add_force_option.yaml
Normal file
3
changelogs/fragments/2110-vdo-add_force_option.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
minor_changes:
|
||||||
|
- vdo - add ``force`` option (https://github.com/ansible-collections/community.general/issues/2101).
|
|
@ -258,6 +258,18 @@ options:
|
||||||
configured setting unless a different value is specified
|
configured setting unless a different value is specified
|
||||||
in the playbook.
|
in the playbook.
|
||||||
type: str
|
type: str
|
||||||
|
force:
|
||||||
|
description:
|
||||||
|
- When creating a volume, ignores any existing file system
|
||||||
|
or VDO signature already present in the storage device.
|
||||||
|
When stopping or removing a VDO volume, first unmounts
|
||||||
|
the file system stored on the device if mounted.
|
||||||
|
- "B(Warning:) Since this parameter removes all safety
|
||||||
|
checks it is important to make sure that all parameters
|
||||||
|
provided are accurate and intentional."
|
||||||
|
type: bool
|
||||||
|
default: no
|
||||||
|
version_added: 2.4.0
|
||||||
notes:
|
notes:
|
||||||
- In general, the default thread configuration should be used.
|
- In general, the default thread configuration should be used.
|
||||||
requirements:
|
requirements:
|
||||||
|
@ -409,6 +421,9 @@ def add_vdooptions(params):
|
||||||
if ('indexmode' in params) and (params['indexmode'] == 'sparse'):
|
if ('indexmode' in params) and (params['indexmode'] == 'sparse'):
|
||||||
options.append("--sparseIndex=enabled")
|
options.append("--sparseIndex=enabled")
|
||||||
|
|
||||||
|
if ('force' in params) and (params['force']):
|
||||||
|
options.append("--force")
|
||||||
|
|
||||||
# Entering an invalid thread config results in a cryptic
|
# Entering an invalid thread config results in a cryptic
|
||||||
# 'Could not set up device mapper for %s' error from the 'vdo'
|
# 'Could not set up device mapper for %s' error from the 'vdo'
|
||||||
# command execution. The dmsetup module on the system will
|
# command execution. The dmsetup module on the system will
|
||||||
|
@ -465,7 +480,8 @@ def run_module():
|
||||||
biothreads=dict(type='str'),
|
biothreads=dict(type='str'),
|
||||||
cputhreads=dict(type='str'),
|
cputhreads=dict(type='str'),
|
||||||
logicalthreads=dict(type='str'),
|
logicalthreads=dict(type='str'),
|
||||||
physicalthreads=dict(type='str')
|
physicalthreads=dict(type='str'),
|
||||||
|
force=dict(type='bool', default=False),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Seed the result dictionary in the object. There will be an
|
# Seed the result dictionary in the object. There will be an
|
||||||
|
|
Loading…
Reference in a new issue