- Can i use below script to copy? iam using below command because i don’t have IOS image stored in ansible controller, rather in a FTP server (10.4.1.104)
tasks:
– name: copy image
cli_command:
command: copy ftp://username:password@10.4.1.104/isr4300-universalk9.16.03.07.SPA.bin flash:
prompt:
– destination filename
answer:
– isr4300-universalk9.16.03.07.SPA.bin
register: output
- How do i MD5 verification after copying image?
I wrote below TASK for MD5 verification but it didn’t work. Iam wondering if i should use ios_command or ios_config module for MD5 verification or some other module?
tasks:
name: show hostname
ios_config:
lines:
verify /md5 flash:isr4300-universalk9.16.03.07.SPA.bin
register: output
debug:
var: output
when: “‘6179d9f5cea5f6274bbccfe13d4ca641’ in output.stdout[0]”