Comments (5)
hi @l0renzor ,
thanks for the issue.
I reproduced your issue with the following playbook:
#cat test.yml
- hosts: fortigates
collections:
- fortinet.fortios
connection: httpapi
vars:
vdom: "root"
ansible_httpapi_use_ssl: yes
ansible_httpapi_validate_certs: no
ansible_httpapi_port: 443
router_prefix_list_one: 'prefix_lst_obj0'
router_map_one: 'router_map_obj0'
tasks:
- name: Configure router prefix list
fortios_router_prefix_list:
vdom: "{{ vdom }}"
https: True
state: present
router_prefix_list:
name: "{{ router_prefix_list_one }}"
comments: 'router prefix list object created via ansible'
rule:
- action: 'permit'
id: 1
prefix: '22.33.44.55/32'
- name: Configure router-map object
fortios_router_route_map:
vdom: "{{ vdom }}"
https: True
state: present
router_route_map:
name: "{{ router_map_one }}"
comments: 'router map object created via ansible'
rule:
- action: permit
id: 1
match_ip_address: "{{ router_prefix_list_one }}"
match_metric: 1
match_tag: 1
set_metric: 2
set_tag: 50
set_weight: 100
set_route_tag: 12
set_local_preference: 44
from api server, I found the rule doesn't take effect at all:
0: config router route-map
0: edit "router_map_obj0"
0: config rule
0: edit 1
0: unset match-metric
0: unset match-tag
0: unset set-aspath
0: unset set-community
0: unset set-extcommunity-rt
0: unset set-extcommunity-soo
0: unset set-local-preference
0: unset set-metric
0: unset set-tag
0: unset set-weight
0: unset set-route-tag
0: end
0: end
so, the parameter is not filled right, I will take some to figure out the right parameters.
thanks,
Link
from ansible-galaxy-fortios-collection.
[httpsd 3502 - 1586702747 info] api_set_cmdb_attr[1624] -- 'name': 'router_map_obj0'
[httpsd 3502 - 1586702747 info] api_set_cmdb_attr[1624] -- 'comments': 'router map object created via ansible'
[httpsd 3502 - 1586702747 info] api_set_cmdb_attr[1624] -- 'id': '1'
[httpsd 3502 - 1586702747 info] api_set_cmdb_attr[1624] -- 'action': 'permit'
[httpsd 3502 - 1586702747 info] api_set_cmdb_attr[1624] -- 'match-ip-address': 'prefix_lst_obj0'
[httpsd 3502 - 1586702747 info] api_set_cmdb_attr[1624] -- 'match-metric': '1'
[httpsd 3502 - 1586702747 info] api_set_cmdb_attr[1624] -- 'match-tag': '1'
[httpsd 3502 - 1586702747 info] api_set_cmdb_attr[1624] -- 'set-local-preference': '44'
[httpsd 3502 - 1586702747 info] api_set_cmdb_attr[1624] -- 'set-metric': '2'
[httpsd 3502 - 1586702747 info] api_set_cmdb_attr[1624] -- 'set-tag': '50'
[httpsd 3502 - 1586702747 info] api_set_cmdb_attr[1624] -- 'set-weight': '100'
[httpsd 3502 - 1586702747 info] api_set_cmdb_attr[1624] -- 'set-route-tag': '12'
0: config router route-map
0: edit "router_map_obj0"
0: end
[httpsd 3502 - 1586702747 info] cmdb_save_with_children[269] -- appended main node (nret=0, is_new=0)
0: config router route-map
0: edit "router_map_obj0"
0: config rule
0: edit 1
0: set match-ip-address ''
0: unset match-metric
0: unset match-tag
0: unset set-local-preference
0: unset set-metric
0: unset set-tag
0: unset set-weight
0: unset set-route-tag
0: end
0: end
I found match-ip-address
is resolved to null string here, it seems that it could not find the prefix-list object. though we created one:
FGVM04TM19006963 # show router prefix-list
path=router, objname=prefix-list, tablename=(null), size=176
config router prefix-list
edit "prefix_lst_obj0"
set comments "router prefix list object created via ansible"
config rule
edit 1
set prefix 22.33.44.55 255.255.255.255
unset ge
unset le
next
end
next
end
thanks to Jie's help, we found this one, but no fix yet.
https://fndn.fortinet.net/index.php?/forums/topic/1995-fortios-rest-api-config-router-prefix-list-issuebug
I will continue to find a workaround.
from ansible-galaxy-fortios-collection.
Hey @chillancezen - I've been running in the same issue here. I think that this is a bug in the API. Did you already create a case to the fortinet support?
from ansible-galaxy-fortios-collection.
depends on mantis #0667114
from ansible-galaxy-fortios-collection.
The bug has been fixed in our latest version, can you please upgrade your device to Fortios v7.0.0 or later to make sure the module works as expected.
Also, please try our latest ansible galaxy collection ansible-galaxy collection install fortinet.fortios:2.1.2
Thanks!
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.