mirror of https://github.com/ansible/ansible.git
Add required_if to AnsibleModule
There is a common pattern in modules where some parameters are required only if another parameter is present AND set to a particular value. For instance, if a cloud server state is "present" it's important to indicate the image to be used, but if it's "absent", the image that was used to launch it is not necessary. Provide a check that takes as an input a list of 3-element tuples containing parameter to depend on, the value it should be set to, and a list of parameters which are required if the required parameter is set to the required value.pull/11093/head
parent
16c70dd7d4
commit
31609e1b16
Loading…
Reference in New Issue