# Apply Ansible generated IOS config file to a router

**URL:** <https://forum.ansible.com/t/apply-ansible-generated-ios-config-file-to-a-router/24025>\
**Category:** Ansible Project\
**Created:** [March 21, 2017, 4:01pm UTC](https://forum.ansible.com/t/apply-ansible-generated-ios-config-file-to-a-router/24025 "2017-03-21T16:01:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jkjxcl](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@jkjxcl](https://forum.ansible.com/u/jkjxcl)\
**Post date:** [March 21, 2017, 4:01pm UTC](https://forum.ansible.com/t/apply-ansible-generated-ios-config-file-to-a-router/24025/1 "2017-03-21T16:01:03Z")

</div>

Hi group.

I have written a python script that goes through an existing IOS config pulling out variables I need and writing them to ./roles/router/vars/main.yml.

An ansible-playbook site.yml takes this file and generates an IOS config from it via a jinja2 template.
