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

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

Custom Application list #329

Closed chr00ted closed 1 month ago

chr00ted commented 1 month ago

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:

MaxxLiu22 commented 1 month ago

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

chr00ted commented 1 month ago

Thanks Maxx, I will test and let you know. Really appreciate your quick response!

chr00ted commented 1 month ago

Once again Maxx, thank you for all of your help. That worked.