mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-08 14:20:04 -07:00
Use argument type checking to convert to boolean
This commit is contained in:
parent
9076f8eb31
commit
df798d0688
22 changed files with 77 additions and 77 deletions
|
@ -241,17 +241,17 @@ def main():
|
|||
line=dict(aliases=['value']),
|
||||
insertafter=dict(default=None),
|
||||
insertbefore=dict(default=None),
|
||||
create=dict(default=False, choices=BOOLEANS),
|
||||
backup=dict(default=False, choices=BOOLEANS),
|
||||
create=dict(default=False, choices=BOOLEANS, type='bool'),
|
||||
backup=dict(default=False, choices=BOOLEANS, type='bool'),
|
||||
),
|
||||
mutually_exclusive = [['insertbefore', 'insertafter']],
|
||||
add_file_common_args=True,
|
||||
add_file_common_args = True,
|
||||
supports_check_mode = True
|
||||
)
|
||||
|
||||
params = module.params
|
||||
create = module.boolean(module.params.get('create', False))
|
||||
backup = module.boolean(module.params.get('backup', False))
|
||||
create = module.params['create']
|
||||
backup = module.params['backup']
|
||||
dest = os.path.expanduser(params['dest'])
|
||||
|
||||
if params['state'] == 'present':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue