Created
March 5, 2020 01:00
-
-
Save afaqk9394/57ceb5d30074f68b450a84076178ef09 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - hosts: router_fsn | |
| gather_facts: no | |
| connection: local | |
| tasks: | |
| - name: Login | |
| include_vars: secrets.yml | |
| - name: Provider definition | |
| set_fact: | |
| provider: | |
| host: "{{ ansible_host }}" | |
| username: "{{ creds['username'] }}" | |
| password: "{{ creds['password'] }}" | |
| auth_pass: "{{ creds['auth_pass'] }}" | |
| - name: IP address assignment | |
| ios_config: | |
| provider: "{{ provider }}" | |
| authorize: yes | |
| parents: "interface giga0/1" | |
| lines: | |
| - description FullStackNetworker | |
| - ip address 10.10.0.1 255.255.255.248 | |
| - ipv6 address 2001:db8:2009::9/64 | |
| - no shutdown | |
| - name: save IOS configuration and backup | |
| ios_config: | |
| provider: "{{ provider }}" | |
| authorize: yes | |
| save: yes | |
| backup: yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment