mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 15:11:23 -07:00
Do key validation only when key is provided
key_id is optional, the previous code didn't handle the case of key_id not specified
This commit is contained in:
parent
6480945184
commit
2592b2c3f9
1 changed files with 6 additions and 5 deletions
|
@ -188,6 +188,7 @@ def main():
|
||||||
state = module.params['state']
|
state = module.params['state']
|
||||||
changed = False
|
changed = False
|
||||||
|
|
||||||
|
if key_id:
|
||||||
try:
|
try:
|
||||||
_ = int(key_id, 16)
|
_ = int(key_id, 16)
|
||||||
key_id = key_id.lstrip('0x')
|
key_id = key_id.lstrip('0x')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue