require armored_public_key if state=present

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Austin Lucas Lake 2024-05-09 21:40:49 -07:00 committed by Austin Lucas Lake
parent 90a8906d3e
commit b1db74bb72
No known key found for this signature in database
GPG key ID: 6A37FA54CFCFA4DB

View file

@ -355,7 +355,10 @@ def main():
} }
module = AnsibleModule( module = AnsibleModule(
argument_spec=argument_spec, argument_spec=argument_spec,
supports_check_mode=True supports_check_mode=True,
required_if=[
('state', 'present', ['armored_public_key']),
],
) )
armored_public_key = module.params.get('armored_public_key') armored_public_key = module.params.get('armored_public_key')