mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add an explicit select
option to portage
module (#8236)
* Add an explicit `select` option to `portage` module This is a fix for #6226 * Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> * Default `select` option to None, making it more retrocompatible * Add changelog fragment for the PR * Update changelogs/fragments/8236-portage-select-feature.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
9d66a1dc1e
commit
be11d0d409
2 changed files with 13 additions and 0 deletions
2
changelogs/fragments/8236-portage-select-feature.yml
Normal file
2
changelogs/fragments/8236-portage-select-feature.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- portage - adds the possibility to explicitely tell portage to write packages to world file (https://github.com/ansible-collections/community.general/issues/6226, https://github.com/ansible-collections/community.general/pull/8236).
|
|
@ -121,6 +121,14 @@ options:
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
|
select:
|
||||||
|
description:
|
||||||
|
- If set to V(true), explicitely add the package to the world file.
|
||||||
|
- Please note that this option is not used for idempotency, it is only used
|
||||||
|
when actually installing a package.
|
||||||
|
type: bool
|
||||||
|
version_added: 8.6.0
|
||||||
|
|
||||||
sync:
|
sync:
|
||||||
description:
|
description:
|
||||||
- Sync package repositories first
|
- Sync package repositories first
|
||||||
|
@ -374,6 +382,7 @@ def emerge_packages(module, packages):
|
||||||
'loadavg': '--load-average',
|
'loadavg': '--load-average',
|
||||||
'backtrack': '--backtrack',
|
'backtrack': '--backtrack',
|
||||||
'withbdeps': '--with-bdeps',
|
'withbdeps': '--with-bdeps',
|
||||||
|
'select': '--select',
|
||||||
}
|
}
|
||||||
|
|
||||||
for flag, arg in emerge_flags.items():
|
for flag, arg in emerge_flags.items():
|
||||||
|
@ -523,6 +532,7 @@ def main():
|
||||||
nodeps=dict(default=False, type='bool'),
|
nodeps=dict(default=False, type='bool'),
|
||||||
onlydeps=dict(default=False, type='bool'),
|
onlydeps=dict(default=False, type='bool'),
|
||||||
depclean=dict(default=False, type='bool'),
|
depclean=dict(default=False, type='bool'),
|
||||||
|
select=dict(default=None, type='bool'),
|
||||||
quiet=dict(default=False, type='bool'),
|
quiet=dict(default=False, type='bool'),
|
||||||
verbose=dict(default=False, type='bool'),
|
verbose=dict(default=False, type='bool'),
|
||||||
sync=dict(default=None, choices=['yes', 'web', 'no']),
|
sync=dict(default=None, choices=['yes', 'web', 'no']),
|
||||||
|
@ -543,6 +553,7 @@ def main():
|
||||||
['quiet', 'verbose'],
|
['quiet', 'verbose'],
|
||||||
['quietbuild', 'verbose'],
|
['quietbuild', 'verbose'],
|
||||||
['quietfail', 'verbose'],
|
['quietfail', 'verbose'],
|
||||||
|
['oneshot', 'select'],
|
||||||
],
|
],
|
||||||
supports_check_mode=True,
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue