1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Use boolean instead of "yes" + choice for most option

This enable a more standard behavior with others modules
This commit is contained in:
Michael Scherer 2016-03-28 09:14:57 +02:00 committed by Matt Clay
parent 2a0c9bb3a2
commit dc94ce72c7

View file

@ -76,29 +76,29 @@ options:
description: description:
- Do not add the packages to the world file (--oneshot) - Do not add the packages to the world file (--oneshot)
required: false required: false
default: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
noreplace: noreplace:
description: description:
- Do not re-emerge installed packages (--noreplace) - Do not re-emerge installed packages (--noreplace)
required: false required: false
default: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
nodeps: nodeps:
description: description:
- Only merge packages but not their dependencies (--nodeps) - Only merge packages but not their dependencies (--nodeps)
required: false required: false
default: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
onlydeps: onlydeps:
description: description:
- Only merge packages' dependencies but not the packages (--onlydeps) - Only merge packages' dependencies but not the packages (--onlydeps)
required: false required: false
default: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
depclean: depclean:
description: description:
@ -106,22 +106,22 @@ options:
- If no package is specified, clean up the world's dependencies - If no package is specified, clean up the world's dependencies
- Otherwise, --depclean serves as a dependency aware version of --unmerge - Otherwise, --depclean serves as a dependency aware version of --unmerge
required: false required: false
default: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
quiet: quiet:
description: description:
- Run emerge in quiet mode (--quiet) - Run emerge in quiet mode (--quiet)
required: false required: false
default: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
verbose: verbose:
description: description:
- Run emerge in verbose mode (--verbose) - Run emerge in verbose mode (--verbose)
required: false required: false
default: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
sync: sync:
description: description:
@ -130,21 +130,21 @@ options:
- If web, perform "emerge-webrsync" - If web, perform "emerge-webrsync"
required: false required: false
default: null default: null
choices: [ "yes", "web" ] choices: [ "yes", "web", "no" ]
getbinpkg: getbinpkg:
description: description:
- Prefer packages specified at PORTAGE_BINHOST in make.conf - Prefer packages specified at PORTAGE_BINHOST in make.conf
required: false required: false
default: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
usepkgonly: usepkgonly:
description: description:
- Merge only binaries (no compiling). This sets getbinpkg=yes. - Merge only binaries (no compiling). This sets getbinpkg=yes.
required: false required: false
deafult: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
requirements: [ gentoolkit ] requirements: [ gentoolkit ]
author: Yap Sok Ann, Andrew Udvare author: Yap Sok Ann, Andrew Udvare
@ -399,21 +399,21 @@ def main():
default=portage_present_states[0], default=portage_present_states[0],
choices=portage_present_states + portage_absent_states, choices=portage_present_states + portage_absent_states,
), ),
update=dict(default=None, choices=['yes']), update=dict(default=False, type='bool'),
deep=dict(default=None, choices=['yes']), deep=dict(default=False, type='bool'),
newuse=dict(default=None, choices=['yes']), newuse=dict(default=False, type='bool'),
changed_use=dict(default=None, choices=['yes']), changed_use=dict(default=False, type='bool'),
oneshot=dict(default=None, choices=['yes']), oneshot=dict(default=False, type='bool'),
noreplace=dict(default=None, choices=['yes']), noreplace=dict(default=False, type='bool'),
nodeps=dict(default=None, choices=['yes']), nodeps=dict(default=False, type='bool'),
onlydeps=dict(default=None, choices=['yes']), onlydeps=dict(default=False, type='bool'),
depclean=dict(default=None, choices=['yes']), depclean=dict(default=False, type='bool'),
quiet=dict(default=None, choices=['yes']), quiet=dict(default=False, type='bool'),
verbose=dict(default=None, choices=['yes']), verbose=dict(default=False, type='bool'),
sync=dict(default=None, choices=['yes', 'web']), sync=dict(default=None, choices=['yes', 'web']),
getbinpkg=dict(default=None, choices=['yes']), getbinpkg=dict(default=False, type='bool'),
usepkgonly=dict(default=None, choices=['yes']), usepkgonly=dict(default=False, type='bool'),
usepkg=dict(default=None, choices=['yes']), usepkg=dict(default=False, type='bool'),
), ),
required_one_of=[['package', 'sync', 'depclean']], required_one_of=[['package', 'sync', 'depclean']],
mutually_exclusive=[['nodeps', 'onlydeps'], ['quiet', 'verbose']], mutually_exclusive=[['nodeps', 'onlydeps'], ['quiet', 'verbose']],