Note
This plugin is part of the community.network collection.
To install it use: ansible-galaxy collection install community.network.
To use it in a playbook, specify: community.network.fmgr_device_group.
| Parameter | Choices/Defaults | Comments |
|---|---|---|
| adom string | Default: "root" | The ADOM the configuration should belong to. |
| grp_desc string | The description of the device group. | |
| grp_members string | 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. | |
| grp_name string | The name of the device group. | |
| mode string |
| Sets one of three modes for managing the object. Allows use of soft-adds instead of overwriting existing values |
| vdom string | Default: "root" | The VDOM of the Fortigate you want to add, must match the device in FMGR. Usually root. |
Note
- name: CREATE DEVICE GROUP
community.network.fmgr_device_group:
grp_name: "TestGroup"
grp_desc: "CreatedbyAnsible"
adom: "ansible"
mode: "add"
- name: CREATE DEVICE GROUP 2
community.network.fmgr_device_group:
grp_name: "AnsibleGroup"
grp_desc: "CreatedbyAnsible"
adom: "ansible"
mode: "add"
- name: ADD DEVICES TO DEVICE GROUP
community.network.fmgr_device_group:
mode: "add"
grp_name: "TestGroup"
grp_members: "FGT1,FGT2"
adom: "ansible"
vdom: "root"
- name: REMOVE DEVICES TO DEVICE GROUP
community.network.fmgr_device_group:
mode: "delete"
grp_name: "TestGroup"
grp_members: "FGT1,FGT2"
adom: "ansible"
- name: DELETE DEVICE GROUP
community.network.fmgr_device_group:
grp_name: "AnsibleGroup"
grp_desc: "CreatedbyAnsible"
mode: "delete"
adom: "ansible"
Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description |
|---|---|---|
| api_result string | always | full API response, includes status code and message |
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/network/fmgr_device_group_module.html