Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add list to fmgr_pkg_firewall_localinpolicy interface option #96

Open
cr0cdev opened this issue Jan 18, 2025 · 1 comment
Open

Add list to fmgr_pkg_firewall_localinpolicy interface option #96

cr0cdev opened this issue Jan 18, 2025 · 1 comment

Comments

@cr0cdev
Copy link

cr0cdev commented Jan 18, 2025

Hi!

Please add an option to list all incoming interfaces in fmgr_pkg_firewall_localinpolicy. At this moment it is supported as str and single object I guess.
Example that works:

# Configure local-in policy
- name: Configure user defined IPv4 local-in policies.
  fortinet.fortimanager.fmgr_pkg_firewall_localinpolicy:
    workspace_locking_adom: "{{ adom_name | lower }}"
    bypass_validation: true
    adom: "{{ adom_name | lower }}"
    pkg: "{{ item.policy_pkgname }}"
    state: present
    pkg_firewall_localinpolicy:
      action: "{{ item.policy_action }}"
      dstaddr: "{{ item.policy_dstaddr }}"
      intf: "{{ item.policy_intf }}"
      policyid: "{{ item.policy_id }}"
      schedule: "{{ item.policy_schedule }}"
      service: "{{ item.policy_service }}"
      srcaddr: "{{ item.policy_srcaddr }}"
      status: "{{ item.policy_status }}"
      comments: "{{ item.policy_comment }}"
  loop: "{{ local_policies }}"

local_policies:
  - policy_id: 1
    policy_pkgname: "{{ fw_policy }}"
    policy_action: accept
    policy_comment: Management
    policy_dstaddr: all
    policy_intf: ["wan", "wan1", "wan2"]
    policy_schedule: always
    policy_service:
      - MGMT-SERVICES
    policy_srcaddr:
      - MGMT-SUBNETS
    policy_status: enable

This will add wan, wan1, wan2 as incoming interfaces.

@cr0cdev cr0cdev changed the title Add list option to fmgr_pkg_firewall_localinpolicy interface option Add list to fmgr_pkg_firewall_localinpolicy interface option Jan 18, 2025
@dux-fortinet
Copy link

Hi cr0cdev,

Thanks for pointing it out. This issue will be fixed in the next version.

Regards,
Xinwei

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants