ansible / ansible.builtin / v2.9.27 / module / spectrum_device Creates/deletes devices in CA Spectrum. | "added in version" 2.6 of ansible.builtin" Authors: Renato Orgito (@orgito) preview | supported by communityansible.builtin.spectrum_device (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
This module allows you to create and delete devices in CA Spectrum U(https://www.ca.com/us/products/ca-spectrum.html).
Tested on CA Spectrum 9.4.2, 10.1.1 and 10.2.1
- 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
url: aliases: - oneclick_url description: - HTTP, HTTPS URL of the Oneclick server in the form (http|https)://host.domain[:port] required: true state: choices: - present - absent default: present description: - On C(present) creates the device when it does not exist. - On C(absent) removes the device when it exists. required: false device: aliases: - host - name description: - IP address of the device. - If a hostname is given, it will be resolved to the IP address. required: true agentport: default: 161 description: - UDP port used for SNMP discovery. required: false community: description: - SNMP community used for device discovery. - Required when C(state=present). landscape: description: - Landscape handle of the SpectroServer to which add or remove the device. required: true use_proxy: default: 'yes' description: - if C(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts. required: false type: bool url_password: aliases: - oneclick_password description: - Oneclick user password. required: true url_username: aliases: - oneclick_user description: - Oneclick user name. required: true validate_certs: default: 'yes' description: - If C(no), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. required: false type: bool
device: description: device data when state = present returned: success sample: address: 10.10.5.1 landscape: '0x100000' model_handle: '0x1007ab' type: dict