Custom Application list
chr00ted opened this issue · comments
I'm writing a playbook for: fortinet.fortios.fortios_application_list and I'm following https://galaxy.ansible.com/ui/repo/published/fortinet/fortios/content/module/fortios_application_list/
But it complains: missing required arguments: id found in application_list -> entries"
but the docs show IDs in the application list.
This is what I'm trying to write in a playbook:
edit "Custom - Block High Risk"
set unknown-application-log enable
config entries
edit 1
set application 16435 16714 27948 34964 17244
set action pass
next
edit 2
set application 37166
next
edit 3
set category 2 6
next
edit 4
set action pass
next
end
next
Here is what I have in my playbook (Please let me know what I'm doing wrong):
tasks:
- name: Config Custom Application
fortinet.fortios.fortios_application_list:
vdom: "root"
state: "present"
application_list:
name: "Custom - Block High Risk"
unknown_application_log: "enable"
entries:
-
action: "pass"
application:
-
id: "16435"
-
id: "16714"
-
id: "27948"
-
id: "34964"
-
id: "17244"
-
action: "block"
application:
-
id: "37166"
-
category:
-
id: "2"
-
id: "6"
-
action: "pass"
Hi @chr00ted ,
Thank you for your question, hope this script is helpful for solving your question.
tasks:
- fortios_application_list:
application_list:
unknown_application_log: enable
entries:
- id: 1
action: pass
application:
- id: 16435
- id: 16714
- id: 27948
- id: 34964
- id: 17244
- id: 2
application:
- id: 37166
- id: 3
category:
- id: 2
- id: 6
- id: 4
action: pass
name: Custom - Block High Risk
state: '{{state}}'
vdom: '{{vdom}}'
name: Test fortios_application_list
Thanks,
Maxx
Thanks Maxx, I will test and let you know. Really appreciate your quick response!
Once again Maxx, thank you for all of your help. That worked.