Removing the variables(which are seperated by ";" in the output of the previous command) one by one for cisco ASA device

9 views
Skip to first unread message

Sahar

unread,
Dec 18, 2018, 11:52:23 AM12/18/18
to Ansible Project
Hi there,

I have a question.

I'm writing an ansible playbook for my cisco ASA device. As part of the playbook, I need to reset the "Current BOOT variable" in below output.



sec/stby/Fw4Script(config)# show bootvar                    

BOOT variable = disk0:/asa916-10-k8.bin;disk0:/asa916-k8.bin
Current BOOT variable = disk0:/asa916-10-k8.bin;disk0:/asa916-k8.bin;disk0:/asa823-k8.bin
CONFIG_FILE variable = 
Current CONFIG_FILE variable = 
sec/stby/Fw4Script(config)# 



And it should be done by 3 steps:


no boot system disk0:/asa823-k8.bin
no boot system disk0:/asa916-k8.bin
no boot system disk0:/asa916-10-k8.bin


So Ansible should get the output and register it, and remove the variables(which are seperated by ";" in the output) one by one.


Anyone has any idea how to do it?

Dick Visser

unread,
Dec 18, 2018, 12:20:51 PM12/18/18
to ansible...@googlegroups.com
Probably register the output, filter by "Current BOOT variable", then apply some regular expressions to match, and use that again later.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a871e688-c305-4bf0-896f-35c390c2dbab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT
Reply all
Reply to author
Forward
0 new messages