This repository is a template to be used when upgrading the Cisco IOS XE software for an existing CSR1000v. It contains sample roles and playbooks to use with either Ansible Engine or AWX Ansible Tower. It is available for use by the Cisco DevNet community through Code Exchange.
You can use this template to update the IOS XE software of one or more Cisco CSR1000v devices in one single view.
- Technology stack: This is an example of infrastructure as a code using Ansible. YAML is primary programming language(s) and code is intended to be used as Ansible roles.
- Status: Alpha
- Tutorial: https://www.youtube.com/watch?v=ADiRvV1BOHA
There are two options to test! You can choose to use Ansible Engine or AWX Ansible Tower.
- With Ansible Engine, run.yml playbook will call roles as a single workflow to perform the upgrade.
- With AWX Ansible Tower, you need to create Job Templates and a Workflow Template.
You also may need to update the variables in ios_var.yaml
for your environment.
Ansible Engine
- Download ansible_engine folder.
- Edit variables in ios_var.yaml for your environment
- Run run.yml
AWX Ansible Tower
- Fork the https://github.com/khinpyaephyosan/csr1000v_upgrade.git link to your Github account
- Create a New Project with SCM TYPE is Git and Sync the project.
- Create each Job Template for pre_check_actions.yml, ftp_actions.yml, upgrade_actions.yml and post_check_actions.yml.
- Create and run Workflow Template, which is sequentially composed by connecting pre_check_actions.yml, ftp_actions.yml, upgrade_actions.yml and post_check_actions.yml Job Templates.
You can edit inventory.ini
file, ios_var.yaml
(variable file), playbooks and roles to change the workflow procedure. These are my references.
- https://docs.ansible.com/ansible/latest/user_guide/playbooks.html
- https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html
Ansible Engine: $ansible-playbook run.yml -i inventory -vv
Ansible AWX Tower: Please reference this link https://www.youtube.com/watch?v=ADiRvV1BOHA
Ansible Engine: $ansible-playbook run.yml -i inventory --check -vv
Ansible AWS Tower: Please reference this link https://www.youtube.com/watch?v=ADiRvV1BOHA
If you have questions, concerns, bug reports, etc., please file an issue in this repository's Issues list.
- projects that I admire: https://developer.cisco.com/iot/
- related project: https://www.youtube.com/watch?v=E7H2_Q-gmC4
- other sources that have meaningful impact or influence on this code: https://developer.cisco.com/, https://www.ansible.com/