community.general.spectrum_device – Creates/deletes devices in CA Spectrum.

Note

This plugin is part of the community.general collection (version 1.3.6).

To install it use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.spectrum_device.

Synopsis

Parameters

Parameter Choices/Defaults Comments
agentport
integer
Default:
161
UDP port used for SNMP discovery.
community
string / required
SNMP community used for device discovery.
Required when state=present.
device
string / required
IP address of the device.
If a hostname is given, it will be resolved to the IP address.

aliases: host, name
landscape
string / required
Landscape handle of the SpectroServer to which add or remove the device.
state
string
    Choices:
  • present ←
  • absent
On present creates the device when it does not exist.
On absent removes the device when it exists.
url
string / required
HTTP, HTTPS URL of the Oneclick server in the form (http|https)://host.domain[:port]

aliases: oneclick_url
url_password
string / required
Oneclick user password.

aliases: oneclick_password
url_username
string / required
Oneclick user name.

aliases: oneclick_user
use_proxy
boolean
    Choices:
  • no
  • yes ←
if no, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
validate_certs
boolean
    Choices:
  • no
  • yes ←
If no, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.

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: no
    state: absent

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
device
dictionary
success
device data when state = present

Sample:
{'address': '10.10.5.1', 'landscape': '0x100000', 'model_handle': '0x1007ab'}


Authors

  • Renato Orgito (@orgito)