# ios\_template making changes when router config already exists

**URL:** <https://forum.ansible.com/t/ios-template-making-changes-when-router-config-already-exists/21158>\
**Category:** Ansible Project\
**Created:** [April 14, 2016, 12:45am UTC](https://forum.ansible.com/t/ios-template-making-changes-when-router-config-already-exists/21158 "2016-04-14T00:45:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luke\_Russell](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@Luke\_Russell](https://forum.ansible.com/u/Luke_Russell)\
**Post date:** [April 14, 2016, 12:45am UTC](https://forum.ansible.com/t/ios-template-making-changes-when-router-config-already-exists/21158/1 "2016-04-14T00:45:40Z")

</div>

I am using ios\_template to deploy some DMVPN tunnels. For some reason it is not recognising two commands that already exist on the router - **ip nhrp map a.a.a.a b.b.b.b** and **ip nhrp nhs a.a.a.a**. I’m not really sure what is unique about these two commands to produce this affect, and it isn’t currently stopping me from doing anything. It just throws a spanner in the idea of being idempotent. My guess would be a problem with the underlying regex doing the screen scraping.

Running the playbook with -vvv option produces this output (cleaned up):

“src”:  
!  
interface Tunnel10  
description primary tunnel  
ip vrf forwarding VRF-A  
ip address 10.0.0.11 255.255.240.0  
no ip redirects  
ip mtu 1400  
ip nhrp authentication 10  
ip nhrp map multicast 172.16.0.11  
ip nhrp map 10.0.0.1 172.16.0.11  
ip nhrp network-id 10  
ip nhrp holdtime 360  
ip nhrp nhs 10.0.0.1  
ip nhrp shortcut  
ip tcp adjust-mss 1360  
load-interval 30  
delay 600  
qos pre-classify  
tunnel source Loopback1  
tunnel mode gre multipoint  
tunnel key 10  
end

“updates”:  
interface Tunnel10  
ip nhrp map 10.0.0.1 172.16.0.11  
ip nhrp ohs 10.0.0.1

---

<div class="post-metadata">

**Author:** ![psprygada](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@psprygada](https://forum.ansible.com/u/psprygada)\
**Post date:** [April 15, 2016, 12:12pm UTC](https://forum.ansible.com/t/ios-template-making-changes-when-router-config-already-exists/21158/2 "2016-04-15T12:12:57Z")

</div>

Hi Luke, We don’t actually screen scrape the configuration in this case. Can you post the full playbook via a gist? (or at least the full task?)

---

<div class="post-metadata">

**Author:** ![Luke\_Russell](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@Luke\_Russell](https://forum.ansible.com/u/Luke_Russell)\
**Post date:** [April 16, 2016, 7:46am UTC](https://forum.ansible.com/t/ios-template-making-changes-when-router-config-already-exists/21158/3 "2016-04-16T07:46:56Z")

</div>

[Link to playbook](https://gist.github.com/lukerussell/47fa117b9664c38021054216f6d66b3f)

Let me know if you need more info.

When you say it’s not screen scraping - how are you getting the running config?

---

<div class="post-metadata">

**Author:** ![Luke\_Russell](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@Luke\_Russell](https://forum.ansible.com/u/Luke_Russell)\
**Post date:** [May 18, 2016, 3:44am UTC](https://forum.ansible.com/t/ios-template-making-changes-when-router-config-already-exists/21158/4 "2016-05-18T03:44:14Z")

</div>

Hi Peter,

Is there any follow up on this? Do you need anything further?

---

<div class="post-metadata">

**Author:** ![psprygada](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@psprygada](https://forum.ansible.com/u/psprygada)\
**Post date:** [May 18, 2016, 1:50pm UTC](https://forum.ansible.com/t/ios-template-making-changes-when-router-config-already-exists/21158/5 "2016-05-18T13:50:12Z")

</div>

ahh thanks for the reminder… will take a look at it this week yet
