Comments (9)
To Add :
I am using raw
module to achieve this now.
- name: Config
raw: |
config firewall addrgrp
edit blklist1
append member test1-10.2.10.0-24
end
from ansible-galaxy-fortios-collection.
thanks @ginigangadharan for the issue.
all APIs an Fortigate device exports for Ansible have only set
semantics, which means we must update/create an object at one go. Unfortunately we don't have available support to address the requirement above.
very glad to know you have the workaround by using raw
, officially, we also have generic module to do the same work:
https://github.com/fortinet/ansible-fortios-generic
thanks,
Link
from ansible-galaxy-fortios-collection.
@chillancezen Thants awesome !
I was looking for a such thing all over; thank you for that.
Okay, also noted on that API support thing.
I will mark this issue as closed for now :)
from ansible-galaxy-fortios-collection.
thanks @ginigangadharan for the issue.
all APIs an Fortigate device exports for Ansible have only
set
semantics, which means we must update/create an object at one go. Unfortunately we don't have available support to address the requirement above.very glad to know you have the workaround by using
raw
, officially, we also have generic module to do the same work: https://github.com/fortinet/ansible-fortios-genericthanks, Link
There is an option called "append" exists now in FortiOS 6.4.10 at least. Is it possible to add this to the fortios_firewall_addrgrp module?
from ansible-galaxy-fortios-collection.
Hi @unbreakabl3,
Thank you for your comment. The append
command is not a new operation of FortiOS v6.4.10. It is an CLI command. But there is no REST API for this functionality. So, we still recommend users to use the solution listed in the previous comments.
Thanks,
Xing
from ansible-galaxy-fortios-collection.
Hi, @lix-fortinet ,
thank you very much for your quick reply.
This REST API call is adding a new member to the group. Tested on 6.4.x
- name: Add new server to the {{ group }} group
uri:
url: https://{{ hostname }}/api/v2/cmdb/firewall/addrgrp/{{ group }}/member?access_token={{ api_access_token }}
method: POST
body_format: json
body: |
{
"name": "{{ address }}"
}
from ansible-galaxy-fortios-collection.
@unbreakabl3 and @lix-fortinet
Thank you for that. Will wait for the update.
from ansible-galaxy-fortios-collection.
Hi @unbreakabl3,
Thank you for your update. You are welcome to use this as your workaround or by the generic module mentioned by chillancezen: https://github.com/fortinet/ansible-fortios-generic. We will keep an eye on this request, and will get back to you once we have any improvement.
Thanks,
Xing
from ansible-galaxy-fortios-collection.
Hi,
Having fought with this myself, it's actually documented here.
Find an example below
- name: Append to address group
fortinet.fortios.fortios_firewall_addrgrp:
vdom: root
state: present
member_state: present
member_path: member:name
firewall_addrgrp:
name: TEST-GROUP
member:
- name: none
Notice that member:name
should be remain as is.
Tested on FortiOS 7.2.0
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.