Skip to content

Commit

Permalink
fixed required_if syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
OrrBG committed Dec 29, 2024
1 parent 0a698a7 commit 2771502
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/modules/content_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def main():
argument_spec.update(
template=dict(type='str', required=True),
library=dict(type='str', required=True),
vm_name=dict(type='str', required=(argument_spec['state'] == 'present')),
vm_name=dict(type='str'),
host=dict(type='str'),
cluster=dict(type='str'),
resource_pool=dict(type='str'),
Expand All @@ -217,6 +217,7 @@ def main():
argument_spec=argument_spec,
supports_check_mode=True,
required_one_of=[('host', 'resource_pool', 'cluster')],
required_if=[('state', 'present', ('vm_name'))]
)

result = {'failed': False, 'changed': False}
Expand Down

0 comments on commit 2771502

Please sign in to comment.