Closed cr0cdev closed 6 months ago
Hi @cr0cdev ,
Thank you for raising this question. Your script runs well on my setup. Error code 404 means there is no path to "/api/v2/cmdb/firewall/addrgrp6/testtest/member". Before using the member operation, we have to make sure the testtest
addrgrp6 object exists. If not, it's better to set state="present"
and comment out the member operation first to create an addrgrp6 object. Let me know if that is not the situation you encountered.
changed: [fortigate03] => (item=[{'vdom': 'root', 'state': 'present', 'member_path': 'member:name', 'member_state': 'present', 'name': 'testtest', 'comment': 'Testing6', 'members': [{'member_name': 'all'}]}, {'member_name': 'all'}]) => {
"ansible_loop_var": "item",
"changed": true,
"invocation": {
"module_args": {
"access_token": null,
"enable_log": false,
"firewall_addrgrp6": {
"color": null,
"comment": "Testing6",
"exclude": null,
"exclude_member": null,
"fabric_object": null,
"member": [
{
"name": "all"
}
],
"name": "testtest",
"tagging": null,
"uuid": null,
"visibility": null
},
"member_path": "member:name",
"member_state": "present",
"state": "present",
"vdom": "root"
}
},
"item": [
{
"comment": "Testing6",
"member_path": "member:name",
"member_state": "present",
"members": [
{
"member_name": "all"
}
],
"name": "testtest",
"state": "present",
"vdom": "root"
},
{
"member_name": "all"
}
],
"meta": [
{
"build": 1577,
"child_path": "member",
"http_method": "POST",
"http_status": 200,
"mkey": "all",
"name": "addrgrp6",
"object_path": "/firewall/addrgrp6/testtest/member/all",
"old_revision": "58e41ac3c936157895c034090c2599c3",
"path": "firewall",
"revision": "0a74f21e80fc9d5b3f56136751f3c514",
"revision_changed": true,
"serial": "FGVMULTM23001481",
"status": "success",
"vdom": "root",
"version": "v7.2.7"
}
]
}
Thanks, Maxx
Closing this issue as it is resolved
Hi!
I'm getting 404 error while trying to add a IPv6 address group, but IPv4 address group adding works fine. Object that should be in the IPv6 address group as a member exists on the firewall (even tried with "all" and "SSL.." which are default objects). Input data:
Task:
Results:
From log: