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

**URL:** <https://forum.ansible.com/t/removing-the-variables-which-are-seperated-by-in-the-output-of-the-previous-command-one-by-one-for-cisco-asa-device/29289>\
**Category:** Ansible Project\
**Created:** [December 18, 2018, 4:52pm UTC](https://forum.ansible.com/t/removing-the-variables-which-are-seperated-by-in-the-output-of-the-previous-command-one-by-one-for-cisco-asa-device/29289 "2018-12-18T16:52:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sahar](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@Sahar](https://forum.ansible.com/u/Sahar)\
**Post date:** [December 18, 2018, 4:52pm UTC](https://forum.ansible.com/t/removing-the-variables-which-are-seperated-by-in-the-output-of-the-previous-command-one-by-one-for-cisco-asa-device/29289/1 "2018-12-18T16:52:23Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [December 18, 2018, 5:20pm UTC](https://forum.ansible.com/t/removing-the-variables-which-are-seperated-by-in-the-output-of-the-previous-command-one-by-one-for-cisco-asa-device/29289/2 "2018-12-18T17:20:24Z")

</div>

Probably register the output, filter by “Current BOOT variable”, then apply some regular expressions to match, and use that again later.
