| Server IP : 85.214.239.14 / Your IP : 216.73.216.189 Web Server : Apache/2.4.65 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 8.2.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/root/usr/lib/python3/dist-packages/ansible_collections/cisco/dnac/playbooks/ |
Upload File : |
---
- hosts: dnac_servers
vars_files:
- credentials.yml
gather_facts: false
tasks:
# - name: Delete by id
# cisco.dnac.pnp_device:
# dnac_host: "{{ dnac_host }}"
# dnac_username: "{{ dnac_username }}"
# dnac_password: "{{ dnac_password }}"
# dnac_verify: "{{ dnac_verify }}"
# dnac_port: "{{ dnac_port }}"
# dnac_version: "{{ dnac_version }}"
# dnac_debug: "{{ dnac_debug }}"
# state: absent
# id: 5f96f83854ee220008a9c456
# register: pnp_device_delete_result
# - name: Show deleted pnp_device
# debug:
# msg: "{{ pnp_device_delete_result }}"
# when:
# - pnp_device_delete_result is defined
- name: Adds or Updates a device to the PnP database
cisco.dnac.pnp_device:
dnac_host: "{{ dnac_host }}"
dnac_username: "{{ dnac_username }}"
dnac_password: "{{ dnac_password }}"
dnac_verify: "{{ dnac_verify }}"
dnac_port: "{{ dnac_port }}"
dnac_version: "{{ dnac_version }}"
dnac_debug: "{{ dnac_debug }}"
state: present
version: 2
deviceInfo:
serialNumber: FOCTEST2
name: FOCTEST2
state: Unclaimed
# onbState: Not Contacted
# cmState: Not Contacted
location: {}
source: User
reloadRequested: false
aaaCredentials:
username: ""
password: ""
populateInventory: false
poeSupported: false
capwapBackOff: false
redirectionState: NONE
dayN: false
dayNClaimOperation: NO_OP
tlsState: NO_OP
reProvision: false
authOperation: AUTHORIZATION_NOT_REQUIRED
stack: false
sudiRequired: false
validActions:
editSUDI: true
editWfParams: true
delete: true
claim: true
unclaim: true
reset: false
authorize: false
resetMsg: This device is not in Error state. Only Error devices may be Reset.
authorizeMsg: This Device is not in PendingAuthorization state.
workflowParameters: {}
tenantId: 5cdc6c45a8405f00c80c6ba3
id: 610ab95c07a77b0fbec39f22
register: pnp_device_result
- name: Show new pnp_device
ansible.builtin.debug:
msg: "{{ pnp_device_result }}"
when:
- pnp_device_result is defined