IOS interface status with Ansible configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2021 05:00 PM
i All,
I am a newbie to Ansible, writing a few codes this week. I found the "no shutdown" command under the interface configuration prompt does not work. Other commands such as "ip address x.x.x.x m.m.m.0" run successfully. The device I used is the csr1000v. The ansible version is 2.9.6. The Python version is 3.8.
Besides, I also tried "status: enable", "enabled: true", and "enabled: yes". Unfortunately, neither was working. Another question is: part of my configuration is ignored when I run the playbook. I thought the device may need a bit more response time to my commands. How can I introduce sleep time between such commands?
Thank you very much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2021 10:52 AM - edited 07-02-2021 10:52 AM
It might be working, but the actual shutdown/open and/or notification could be delayed. I found an interesting article (external) titled CSR1000v link status UP/DOWN notifications arriving late, which describes a delay, as high as 10 seconds, to this command in particular. You mentioned you're a newbie to Ansible, so here are a few more tutorials (both external, as well), which lay out the instructions in a straightforward manner:
- Ansible first experience: use ansible to configure cisco devices
- Ansible study note 10. ansible-playbook – simple Cisco router configuration 2
Here is a link to the DevNet Cisco IOS XE Sandboxes, which include model on CSR1000v: Cisco IOS XE Sandboxes. You can test out whether or not you can recreate this bug. Speaking of bugs, check out the Cisco Bug Search Tool, and check if what you describe is a known error with that model or version.
Hope this helps!
