Check the key_text option doesn't conflict with any other options

There are checks for `key_url` and `keyid`/`keyserver`, so we should
probably also have a check for `key_text` as well.
This commit is contained in:
John Kristensen 2017-10-04 15:50:50 +11:00
parent 3468e9c38f
commit 0cf411671e

View File

@ -312,6 +312,16 @@ def managed(name, ppa=None, **kwargs):
ret['result'] = False
ret['comment'] = 'You may not use both "keyid"/"keyserver" and ' \
'"key_url" argument.'
if 'key_text' in kwargs and ('keyid' in kwargs or 'keyserver' in kwargs):
ret['result'] = False
ret['comment'] = 'You may not use both "keyid"/"keyserver" and ' \
'"key_text" argument.'
if 'key_text' in kwargs and ('key_url' in kwargs):
ret['result'] = False
ret['comment'] = 'You may not use both "key_url" and ' \
'"key_text" argument.'
if 'repo' in kwargs:
ret['result'] = False
ret['comment'] = ('\'repo\' is not a supported argument for this '