community / community.network / 0.1.0 / module / fmgr_device_group Alter FortiManager device groups. Authors: Luke Weighall (@lweighall), Andrew Welsh (@Ghilli3), Jim Huber (@p4r4n0y1ng)community.network.fmgr_device_group (0.1.0) — module
Install with ansible-galaxy collection install community.network:==0.1.0
collections: - name: community.network version: 0.1.0
Add or edit device groups and assign devices to device groups FortiManager Device Manager using JSON RPC API.
- name: CREATE DEVICE GROUP fmgr_device_group: grp_name: "TestGroup" grp_desc: "CreatedbyAnsible" adom: "ansible" mode: "add"
- name: CREATE DEVICE GROUP 2 fmgr_device_group: grp_name: "AnsibleGroup" grp_desc: "CreatedbyAnsible" adom: "ansible" mode: "add"
- name: ADD DEVICES TO DEVICE GROUP fmgr_device_group: mode: "add" grp_name: "TestGroup" grp_members: "FGT1,FGT2" adom: "ansible" vdom: "root"
- name: REMOVE DEVICES TO DEVICE GROUP fmgr_device_group: mode: "delete" grp_name: "TestGroup" grp_members: "FGT1,FGT2" adom: "ansible"
- name: DELETE DEVICE GROUP fmgr_device_group: grp_name: "AnsibleGroup" grp_desc: "CreatedbyAnsible" mode: "delete" adom: "ansible"
adom: default: root description: - The ADOM the configuration should belong to. required: false mode: choices: - add - set - delete - update default: add description: - Sets one of three modes for managing the object. - Allows use of soft-adds instead of overwriting existing values required: false vdom: default: root description: - The VDOM of the Fortigate you want to add, must match the device in FMGR. Usually root. required: false grp_desc: description: - The description of the device group. required: false grp_name: description: - The name of the device group. required: false grp_members: description: - A comma separated list of device names or device groups to be added as members to the device group. - If Group Members are defined, and mode="delete", only group members will be removed. - If you want to delete a group itself, you must omit this parameter from the task in playbook. required: false
api_result: description: full API response, includes status code and message returned: always type: str