community.general.spectrum_device module – Creates/deletes devices in CA Spectrum
Note
This module is part of the community.general collection (version 10.0.1).
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_device
.
Synopsis
This module allows you to create and delete devices in CA Spectrum https://www.ca.com/us/products/ca-spectrum.html.
Tested on CA Spectrum 9.4.2, 10.1.1 and 10.2.1
Parameters
Parameter |
Comments |
---|---|
UDP port used for SNMP discovery. Default: |
|
SNMP community used for device discovery. Required when |
|
IP address of the device. If a hostname is given, it will be resolved to the IP address. |
|
Landscape handle of the SpectroServer to which add or remove the device. |
|
On On Choices:
|
|
HTTP, HTTPS URL of the Oneclick server in the form |
|
Oneclick user password. |
|
Oneclick user name. |
|
if Choices:
|
|
If 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
The devices will be created inside the Universe container of the specified landscape.
All the operations will be performed only on the specified landscape.
Examples
- name: Add device to CA Spectrum
local_action:
module: spectrum_device
device: '{{ ansible_host }}'
community: secret
landscape: '0x100000'
oneclick_url: http://oneclick.example.com:8080
oneclick_user: username
oneclick_password: password
state: present
- name: Remove device from CA Spectrum
local_action:
module: spectrum_device
device: '{{ ansible_host }}'
landscape: '{{ landscape_handle }}'
oneclick_url: http://oneclick.example.com:8080
oneclick_user: username
oneclick_password: password
use_proxy: false
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
device data when state = present Returned: success Sample: |