morpheus.core.group module -- Manage Groups
Note
This module is part of the morpheus.core collection (version 0.7.1).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install morpheus.core
.
To use it in a playbook, specify: morpheus.core.group
.
.. rst-class:: ansible-version-added
New in morpheus.core 0.7.0
Create, Update and Remove Groups.
.. tabularcolumns:: \X{1}{3}\X{2}{3}
Parameter
Comments
.. rst-class:: ansible-option-title
cm_id
.. ansible-option-type-line::
:ansible-option-type:`integer`
Id of a Change Management Integration.
.. rst-class:: ansible-option-title
cmdb_discovery
.. ansible-option-type-line::
:ansible-option-type:`boolean`
.. rst-class:: ansible-option-title
cmdb_id
.. ansible-option-type-line::
:ansible-option-type:`integer`
Id of a CMDB Integration.
.. rst-class:: ansible-option-title
code
.. ansible-option-type-line::
:ansible-option-type:`string`
Short Code name for the Group.
.. rst-class:: ansible-option-title
config_management_id
.. ansible-option-type-line::
:ansible-option-type:`integer`
Id of a Configuration Management Integration.
.. rst-class:: ansible-option-title
dns_id
.. ansible-option-type-line::
:ansible-option-type:`integer`
.. rst-class:: ansible-option-title
id
.. ansible-option-type-line::
:ansible-option-type:`integer`
.. rst-class:: ansible-option-title
labels
.. ansible-option-type-line::
:ansible-option-type:`list` / :ansible-option-elements:`elements=string`
List of Labels for the Group.
.. rst-class:: ansible-option-title
location
.. ansible-option-type-line::
:ansible-option-type:`string`
Location information for the Group.
.. rst-class:: ansible-option-title
name
.. ansible-option-type-line::
:ansible-option-type:`string`
.. rst-class:: ansible-option-title
service_registry_id
.. ansible-option-type-line::
:ansible-option-type:`integer`
Id of a Service Registry Integration.
.. rst-class:: ansible-option-title
state
.. ansible-option-type-line::
:ansible-option-type:`string`
.. rst-class:: ansible-option-title
zones
.. ansible-option-type-line::
:ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary`
Set the state of Clouds/Zones in this Group.
.. rst-class:: ansible-option-title
id
.. ansible-option-type-line::
:ansible-option-type:`integer` / :ansible-option-required:`required`
The Id of the Cloud/Zone.
.. rst-class:: ansible-option-title
state
.. ansible-option-type-line::
:ansible-option-type:`string`
.. tabularcolumns:: \X{2}{10}\X{3}{10}\X{5}{10}
Attribute
Support
Description
.. rst-class:: ansible-option-title
check_mode
Can run in check_mode and return changed status prediction without modifying target
.. rst-class:: ansible-option-title
diff_mode
Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode
.. rst-class:: ansible-option-title
platform
Target OS/families that can be operated against
- name: Create/Update a Group
morpheus.core.group:
state: present
name: MyGroup
code: my_group
location: Earth
- name: Update Clouds/Zones in Group
morpheus.core.group:
state: present
name: MyGroup
zones:
- state: present
id: 17
- state: present
id: 18
- name: Remove Group
morpheus.core.group:
state: absent
name: MyGroup
Common return values are documented :ref:`here <common_return_values>` , the following are the fields unique to this module:
.. tabularcolumns:: \X{1}{3}\X{2}{3}
Key
Description
.. rst-class:: ansible-option-title
group
.. ansible-option-type-line::
:ansible-option-type:`dictionary`
Group Information.
.. rst-class:: ansible-option-line
:ansible-option-returned-bold:`Returned:` always
.. rst-class:: ansible-option-line
.. rst-class:: ansible-option-sample
:ansible-option-sample-bold:`Sample:` :ansible-rv-sample-value:`{"group": {"account\_id": 1, "active": true, "code": "my\_group", "config": {"config\_cm\_id": null, "config\_cmdb\_discovery": false, "config\_cmdb\_id": null, "config\_management\_id": null, "dns\_integration\_id": null, "service\_registry\_id": null}, "date\_created": "2024-01-01T00:00:01Z", "id": 284, "last\_updated": "2024-01-01T00:00:01Z", "location": "Earth", "name": "MyGroup", "server\_count": 0, "stats": {"instance\_counts": {"all": 0}, "server\_counts": {"all": 0, "baremetal": 0, "container\_host": 0, "host": 0, "hypervisor": 0, "unmanaged": 0, "vm": 0}}, "zones": [{"id": 17, "name": "MyCloud"}]}}`
James Riach (@McGlovin1337)
.. ansible-links::
- title: "Repository (Sources)"
url: "https://www.github.com/gomorpheus/ansible-collection-morpheus-core"
external: true