community.general.spectrum_model_attrs module – Enforce a model’s attributes in CA Spectrum
Note
This module is part of the community.general collection (version 8.6.8).
You might already have this collection installed if you are using the ansible
package.
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 community.general
.
To use it in a playbook, specify: community.general.spectrum_model_attrs
.
New in community.general 2.5.0
Synopsis
This module can be used to enforce a model’s attributes in CA Spectrum.
Aliases: monitoring.spectrum_model_attrs
Parameters
Parameter |
Comments |
---|---|
A list of attribute names and values to enforce. All values and parameters are case sensitive and must be provided as strings only. |
|
Attribute name OR hex ID. Currently defined names are:
Hex IDs are the direct identifiers in Spectrum and will always work. To lookup hex IDs go to the UI: Locator -> Devices -> By Model Name -> <enter any model> -> Attributes tab. |
|
Attribute value. Empty strings should be |
|
Model name. |
|
Model type. |
|
URL of OneClick server. |
|
OneClick password. |
|
OneClick username. |
|
if Choices:
|
|
Validate SSL certificates. Only change this to Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Notes
Note
Tested on CA Spectrum version 10.4.2.0.189.
Model creation and deletion are not possible with this module. For that use community.general.spectrum_device instead.
Examples
- name: Enforce maintenance mode for modelxyz01 with a note about why
community.general.spectrum_model_attrs:
url: "http://oneclick.url.com"
username: "{{ oneclick_username }}"
password: "{{ oneclick_password }}"
name: "modelxyz01"
type: "Host_Device"
validate_certs: true
attributes:
- name: "isManaged"
value: "false"
- name: "Notes"
value: "MM set on {{ ansible_date_time.iso8601 }} via CO {{ CO }} by {{ tower_user_name | default(ansible_user_id) }}"
delegate_to: localhost
register: spectrum_model_attrs_status
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Dictionary of changed name or hex IDs (whichever was specified) to their new corresponding values. Returned: always Sample: |
|
Informational message on the job result. Returned: always Sample: |