apk: Fix mutual exclusivity (#2768)
* apk: Fix mutual exclusivity Ensure that 'name' and 'upgrade' are mutually exclusive. Also add a note to the documentation to say so. Fixes: #2767 * Fix documentation
This commit is contained in:
parent
0dcf27964c
commit
b8db87d206
1 changed files with 3 additions and 0 deletions
|
@ -52,6 +52,8 @@ options:
|
||||||
required: false
|
required: false
|
||||||
default: no
|
default: no
|
||||||
choices: [ "yes", "no" ]
|
choices: [ "yes", "no" ]
|
||||||
|
notes:
|
||||||
|
- '"name" and "upgrade" are mutually exclusive.'
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
|
@ -209,6 +211,7 @@ def main():
|
||||||
upgrade = dict(default='no', type='bool'),
|
upgrade = dict(default='no', type='bool'),
|
||||||
),
|
),
|
||||||
required_one_of = [['name', 'update_cache', 'upgrade']],
|
required_one_of = [['name', 'update_cache', 'upgrade']],
|
||||||
|
mutually_exclusive = [['name', 'upgrade']],
|
||||||
supports_check_mode = True
|
supports_check_mode = True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue