-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More descriptive name both for Ansible and Python variables, and add documentation
- Loading branch information
Showing
4 changed files
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,10 @@ | |
description: | ||
- boolean indicating that we should fail rather than implicitly/automatically | ||
removing devices or formatting | ||
diskvolume_mkfs_option_map: | ||
description: | ||
- dict which maps filesystem names to additional mkfs options that should be used | ||
when creating a disk volume (that is, a whole disk filesystem) | ||
author: | ||
- David Lehman ([email protected]) | ||
|
@@ -453,7 +457,7 @@ def _type_check(self): | |
def _get_format(self): | ||
fmt = super(BlivetDiskVolume, self)._get_format() | ||
# pass -F to mke2fs on whole disks in RHEL7 | ||
mkfs_options = mkfs_option_map.get(self._volume['fs_type']) | ||
mkfs_options = diskvolume_mkfs_option_map.get(self._volume['fs_type']) | ||
if mkfs_options: | ||
if fmt.create_options: | ||
fmt.create_options += " " | ||
|
@@ -1125,7 +1129,7 @@ def run_module(): | |
disklabel_type=dict(type='str', required=False, default=None), | ||
safe_mode=dict(type='bool', required=False, default=True), | ||
use_partitions=dict(type='bool', required=False, default=True), | ||
mkfs_option_map=dict(type='dict', required=False, default={})) | ||
diskvolume_mkfs_option_map=dict(type='dict', required=False, default={})) | ||
|
||
# seed the result dict in the object | ||
result = dict( | ||
|
@@ -1161,8 +1165,8 @@ def run_module(): | |
global safe_mode | ||
safe_mode = module.params['safe_mode'] | ||
|
||
global mkfs_option_map | ||
mkfs_option_map = module.params['mkfs_option_map'] | ||
global diskvolume_mkfs_option_map | ||
diskvolume_mkfs_option_map = module.params['diskvolume_mkfs_option_map'] | ||
|
||
b = Blivet() | ||
b.reset() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters