Comments (2)
Hi @Tiguespa ,
Thank you for your question. Our Ansible module is designed to manage the entire object and ensure consistency between scripts and actual configurations. However, we do offer a member operation feature that allows for adding or deleting elements from an existing block. Please find an example below. Do let us know if this does not meet your requirements.
tasks:
- name: Configure interfaces.
fortios_system_interface:
vdom: root
state: present
member_state: present # present for adding and updating, absent for deleting
member_path: secondaryip:id # main key for locating the element
system_interface:
vdom: root
allowaccess:
- ping
- ssh
- https
ip: 1.2.56.4/24
name: test234
type: vlan
secondary_IP: "enable"
vlanid: 766
interface: port2
secondaryip:
-
ip: "2.3.4.6/24"
id: "2"
Thanks,
Maxx
from ansible-galaxy-fortios-collection.
Thanks you Maxx, it seems it does exactly what i wanted !
I didn't understand member_state/path allowed to do that :)
from ansible-galaxy-fortios-collection.
Related Issues (20)
- Error creating VLAN interface in different VDOM with fortinet.fortios.fortios_system_interface HOT 11
- fortios_firewall_vip ignores ldb_method HOT 3
- Custom Application list HOT 3
- KeyError: 'ldb_method' with --check HOT 2
- Playbook Runs successfully, but dont see addition in GUI after, cli shows its there HOT 3
- firewall policy always shows changes HOT 6
- ConnectionError: command timeout triggered HOT 1
- Unknown action 0 Command fail. Return code -1 HOT 1
- API based auth failed: wrong credentials HOT 1
- full backup HOT 4
- `IndexError: list index out of range` when running check mode on `fortios_firewall_addrgrp` HOT 1
- fortinet.fortios 2.3.6 does not work with ansible-core 2.17.2 for backups HOT 4
- fortios_configuration_fact local usernames under global configuration HOT 1
- fortinet.fortios.fortios_configuration_fact | Selector: "system_status" | "msg": "Error in repo" | fortios version 2.3.6 HOT 1
- Question on fortinet.fortios.fortios_export_config_playbook HOT 6
- How to speed up configuration changes HOT 1
- fortinet.fortios.fortios_firewall_addrgrp & json input HOT 3
- system_version check breaks support for using vDOM-specific credentials HOT 1
- "fortios_router_prefix_list" module is replacing existing configuration HOT 1
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.