mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-21 09:51:27 -07:00
* fix stackpath_compute validate_config
get the lenght for the client_id / client_secret to validate inventory configuration
* Add changelog fragment.
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 4cdff8654a
)
Co-authored-by: vbarba <victor.barba@gmail.com>
This commit is contained in:
parent
af0ce4284f
commit
b49607f12d
2 changed files with 4 additions and 2 deletions
|
@ -102,13 +102,13 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
|||
raise AnsibleError("plugin doesn't match this plugin")
|
||||
try:
|
||||
client_id = config['client_id']
|
||||
if client_id != 32:
|
||||
if len(client_id) != 32:
|
||||
raise AnsibleError("client_id must be 32 characters long")
|
||||
except KeyError:
|
||||
raise AnsibleError("config missing client_id, a required option")
|
||||
try:
|
||||
client_secret = config['client_secret']
|
||||
if client_secret != 64:
|
||||
if len(client_secret) != 64:
|
||||
raise AnsibleError("client_secret must be 64 characters long")
|
||||
except KeyError:
|
||||
raise AnsibleError("config missing client_id, a required option")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue