Adding fix for Stackswitch getting changed to normal switch post editing the device's info #187
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PLAY [Manage operations - Add, claim, and delete devices of Onboarding Configuration (PnP)] ************************************************************************************************************
Read vars_file '{{ CLUSTERFILE }}'
META: ran handlers
Read vars_file '{{ CLUSTERFILE }}'
TASK [Claim a pre-added stack switch, apply a template, and perform an image upgrade for a specific site] **********************************************************************************************
task path: /home/admin/madhan_ansible/collections/ansible_collections/cisco/dnac/playbooks/PnP.yml:154
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: admin
<127.0.0.1> EXEC /bin/sh -c 'echo ~admin && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "
echo /home/admin/.ansible/tmp
"&& mkdir "echo /home/admin/.ansible/tmp/ansible-tmp-1709792619.8986197-805288-269125788707987
" && echo ansible-tmp-1709792619.8986197-805288-269125788707987="echo /home/admin/.ansible/tmp/ansible-tmp-1709792619.8986197-805288-269125788707987
" ) && sleep 0'Using module file /home/admin/madhan_ansible/collections/ansible_collections/cisco/dnac/plugins/modules/pnp_intent.py
<127.0.0.1> PUT /home/admin/.ansible/tmp/ansible-local-804761alwxsjdt/tmpdz4l0o99 TO /home/admin/.ansible/tmp/ansible-tmp-1709792619.8986197-805288-269125788707987/AnsiballZ_pnp_intent.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/admin/.ansible/tmp/ansible-tmp-1709792619.8986197-805288-269125788707987/ /home/admin/.ansible/tmp/ansible-tmp-1709792619.8986197-805288-269125788707987/AnsiballZ_pnp_intent.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/home/admin/pyats_env/bin/python3 /home/admin/.ansible/tmp/ansible-tmp-1709792619.8986197-805288-269125788707987/AnsiballZ_pnp_intent.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/admin/.ansible/tmp/ansible-tmp-1709792619.8986197-805288-269125788707987/ > /dev/null 2>&1 && sleep 0'
changed: [localhost] => {
"changed": true,
"diff": [
{
"device_info": [
{
"hostname": "Only_Stack",
"pid": "C9300-48UXM",
"serialNumber": "FJC271924EQ",
"stack": true,
"state": "Unclaimed"
}
],
"gateway": null,
"golden_image": null,
"image_name": null,
"ip_interface_name": null,
"pnp_type": "StackSwitch",
"project_name": "Onboarding Configuration",
"rf_profile": null,
"sensorProfile": null,
"site_name": "Global/USA/San Francisco/BGL_18",
"static_ip": null,
"subnet_mask": null,
"template_name": null,
"template_params": null,
"vlan_id": null
}
],
"invocation": {
"module_args": {
"config": [
{
"device_info": [
{
"hostname": "Only_Stack",
"pid": "C9300-48UXM",
"serial_number": "FJC271924EQ",
"state": "Unclaimed"
}
],
"pnp_type": "StackSwitch",
"project_name": "Onboarding Configuration",
"site_name": "Global/USA/San Francisco/BGL_18"
}
],
"config_verify": false,
"dnac_debug": true,
"dnac_host": "172.23.241.186",
"dnac_log": true,
"dnac_log_append": true,
"dnac_log_file_path": "dnac.log",
"dnac_log_level": "DEBUG",
"dnac_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"dnac_port": "443",
"dnac_username": "admin",
"dnac_verify": false,
"dnac_version": "2.3.5.3",
"state": "merged",
"validate_response_schema": true
}
},
"msg": "Only Device Claimed Successfully",
"response": {
"response": "Device Claimed",
"version": "1.0"
}
}
Read vars_file '{{ CLUSTERFILE }}'
META: ran handlers
Read vars_file '{{ CLUSTERFILE }}'
META: ran handlers
PLAY RECAP *********************************************************************************************************************************************************************************************
localhost : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
7. Follow-up Tasks: Will raise a bug to the API team to fix the issue with the bug and also there is a DEBUG statement added for the user to check the payload getting sent for the API.