- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2023 10:19 PM
Hey there,
I'm trying to make a playbook which will send commands to Cisco WLC to send backup config to tftp server.
While i'm performing manual commands to the WLC the config backup are uploading to my tftp server without any case.
Here is my set of commands which i perform manually:
(Cisco Controller) >transfer upload mode tftp
(Cisco Controller) >transfer upload datatype config
(Cisco Controller) >transfer upload filename backup_config.cfg
(Cisco Controller) >transfer upload path /
(Cisco Controller) >transfer upload serverip 99.99.99.99
(Cisco Controller) >transfer upload start
(Cisco Controller) >y
Here is the output from the Cisco WLC:
(Cisco Controller) >transfer upload start
Mode............................................. TFTP
TFTP Server IP................................... 99.99.99.99
TFTP Path........................................ /
TFTP Filename.................................... backup_config.cfg
Data Type........................................ Config File
Encryption....................................... Disabled
**************************************************
*** WARNING: Config File Encryption Disabled ***
**************************************************
Are you sure you want to start? (y/N) y
TFTP Config transfer starting.
File transfer operation completed successfully.
As you see "File transfer operation completed successfully."
So i try to perform the same logig and the same set of commands using ansible playbook:
"changed": false,
"invocation": {
"module_args": {
"commands": [
{
"answer": "y",
"command": "transfer download start",
"prompt": "Are you sure you want to start?"
}
],
"host": null,
"interval": 1,
"match": "all",
"password": null,
"port": null,
"retries": 10,
"ssh_keyfile": null,
"timeout": null,
"username": null,
"wait_for": null
}
},
"stdout": [
"Mode............................................. TFTP\nData Type........................................ Code\nTFTP Server IP................................... 99.99.99.99\nTFTP Packet Timeout.............................. 6\nTFTP Max Retries................................. 10\nTFTP Path........................................ /\nTFTP Filename.................................... backup_config.cfg\n\nThis may take some time.\nAre you sure you want to start? (y/N) y\n\nTFTP Code File type not supported!"
],
"stdout_lines": [
[
"Mode............................................. TFTP",
"Data Type........................................ Code",
"TFTP Server IP................................... 99.99.99.99",
"TFTP Packet Timeout.............................. 6",
"TFTP Max Retries................................. 10",
"TFTP Path........................................ /",
"TFTP Filename.................................... backup_config.cfg",
"",
"This may take some time.",
"Are you sure you want to start? (y/N) y",
"",
"TFTP Code File type not supported!"
]
]
}
Solved! Go to Solution.
- Labels:
-
Wireless LAN Controller
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2023 01:24 AM
Found a missconfig on my Playbook:
I use: transfer download start command instead of transfer upload start
Now my PB works fine and task lokks like that:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2023 01:24 AM
Found a missconfig on my Playbook:
I use: transfer download start command instead of transfer upload start
Now my PB works fine and task lokks like that:
