Comments (7)
FYI, ansible-fortios-generic is a possible workaround while this issue is not fixed.
# tasks/config_firewall_policy_generic_dict.yml
---
- name: config firewall policy
fortios_json_generic:
vdom: '{{ vdom }}'
json_generic:
method: 'POST'
path: '/api/v2/cmdb/firewall/policy'
dictbody:
policyid: 100
name: INET
srcintf:
- name: port3
dstintf:
- name: WAN_Zone
srcaddr:
- name: all
dstaddr:
- name: all
service:
- name: ALL
action: accept
schedule: always
nat: enable
ssl-ssh-profile: certificate-inspection
inspection-mode: proxy
http-policy-redirect: enable
register: info
- name: display vars
debug: msg='{{ info }}'
from ansible-galaxy-fortios-collection.
Hi @mbdraks,
I cannot reproduce the error as shown above. Can you please check if the module in galaxy collection is called? I guess the old ansible module is called instead of the one in collection. Because parameters like inspection_mode and http_policy_redirect are supported only in galaxy collection.
Here's a tip to look up the runtime module.
from ansible-galaxy-fortios-collection.
Thanks for the tip!
I was indeed hitting
/usr/local/lib/python3.7/dist-packages/ansible/modules/network/fortios/fortios_firewall_policy.py
instead of the expected /root/.ansible/collections/ansible_collections/fortinet/fortios/plugins/modules/fortios_firewall_policy.py
and the root cause is that using the collections
upon calling a role is not supported (as mentioned here: ansible/ansible#66667 and here: ansible/ansible#68198) however I was not getting a namespace error because of the legacy module.
from ansible-galaxy-fortios-collection.
Hello, got roughly what you said but cannot find whats going on, havin the same problem with venv Python 3 and Ansible 2.9; collection has been installed with pip
from ansible-galaxy-fortios-collection.
(Ansible3) shell@srvdeb:~/code/automation path/automation/Automation/ansible-fortinet$ ansible --version
ansible 2.10.7
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/shell/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/my-envs/custom-venv/Ansible3/lib/python3.7/site-packages/ansible
redirecting (type: connection) ansible.builtin.httpapi to ansible.netcommon.httpapi
<fortitest.test.local> ESTABLISH LOCAL CONNECTION FOR USER: shell
<fortitest.test.local> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /home/shell/.ansible/tmp/ansible-local-13294gf8gk16k
"&& mkdir "echo /home/shell/.ansible/tmp/ansible-local-13294gf8gk16k/ansible-tmp-1616773037.5515132-13362-115384893709348
" && echo ansible-tmp-1616773037.5515132-13362-115384893709348="echo /home/shell/.ansible/tmp/ansible-local-13294gf8gk16k/ansible-tmp-1616773037.5515132-13362-115384893709348
" ) && sleep 0'
Using module file /home/shell/.ansible/collections/ansible_collections/fortinet/fortios/plugins/modules/fortios_firewall_policy.py
from ansible-galaxy-fortios-collection.
Hi @rdzielicki,
It seems module fortios)firewall_policy in fortios galaxy collection is called and everything is fine. Can you please provide me more detail on the issue, like the playbook you are using.
Thanks.
from ansible-galaxy-fortios-collection.
i'll work on the subject this Friday, i'll provide my Playbook but they are roughly the same as mbdrack user above
from ansible-galaxy-fortios-collection.
Related Issues (20)
- Can not set Admin SSH keys. "Error in Repo" HOT 4
- "Error in repo" using fortios_firewall_policy module HOT 4
- config system globals timezone not numeric in 7.4.2 HOT 3
- How to Create SDWAN Zone HOT 11
- Changing admin user password results in 403 PUT error. HOT 1
- network os fortinet.fortios.fortios is not supported HOT 1
- Is global scope security profile supported? HOT 1
- fortinet.fortios.fortios_monitor_fact filter questions HOT 4
- fortinet.fortios.fortios_monitor -selector upgrade.system.firmware possible issue? HOT 3
- Need help w/playbook to list all managed fortiap's per firewall. HOT 4
- updating policy based routing of fortigate is not working always has seq-num error HOT 2
- There must be at least 1 server certificate configured HOT 2
- Getting 404 error while trying to add IPv6 address group using fortios_firewall_addrgrp6 HOT 2
- Error in comparison/serialize HOT 4
- Question on usage - setting dhcp (v4) reservations HOT 3
- federated-upgrade 7.2.7>7.2.8 problem HOT 2
- fortios_system_global timezone not working with FortiOS 7.4.2 and higher HOT 3
- fortinet.fortios.fortios_firewall_addrgrp module question HOT 8
- fortigate firewall firmware upgrade using fortios_monitor module HOT 2
- check mode error since 2.3.5 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-galaxy-fortios-collection.