Hi all,

I am attempting to create a custom module and when I am defining the custom 
parameters.

Example.  I have this section defined and I only want to packagename 
required if someone passes "add_package_to_content_view" as an action.

  fields = {
        "organization": {"required": True, "type": "str"},
        "satelliteurl": {"required": True, "type": "str"},
        "cvname": {"required": True, "type": "str"},
        "action": {"required": True, "type": "str", "choices": 
["create_standard_content_view","create_custom_content_view","add_repo_to_content_view","add_package_to_content_view"]},
        "packagename": {"required": False, "type": "str"}
  }


Is there a way to mark certain params as required in this above example or 
do I have to define the condition after everything is set?


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/c18e6f40-337d-4174-be14-01ad3c4fd4d4%40googlegroups.com.

Reply via email to