fortinet-ansible-dev / ansible-galaxy-fortios-collection

GNU General Public License v3.0
84 stars 48 forks source link

Cannot set multiple member_paths #243

Closed cwilliams-intelerad closed 1 year ago

cwilliams-intelerad commented 1 year ago

Unable to set multiple member_path. Sure this is the same in many modules but I am working on fortios_firewall_policy in particular. I receive an error message on the second member_path no matter what it is. Am I using the correct syntax? If not, what is correct way to maintain state of multiple paths in same module?

Error: "msg": "Attribute dstinf not as part of module schema"

Code:

`---

JieX19 commented 1 year ago

Hi @cwilliams-intelerad,

Multiple member_paths are not supported currently, FYI, https://ansible-galaxy-fortios-docs.readthedocs.io/en/galaxy-2.1.6/gen/fortios_firewall_policy.html, and https://ansible-galaxy-fortios-docs.readthedocs.io/en/2.2.3/faq.html#how-to-use-the-member-operation-to-add-an-element-in-an-object

The slash "/" is used for the recursive path in the module.

In your case, you can run multiple tasks in a playbook to add elements to each object.

Thanks, Jie

cwilliams-intelerad commented 1 year ago

I see. Thank you for the quick response!