Created
September 12, 2023 11:45
-
-
Save msterhuj/47774ccee720639faa4a241fc3ed7ef4 to your computer and use it in GitHub Desktop.
This file contains 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
- name: "Config Router" | |
hosts: all | |
gather_facts: false | |
vars: | |
ansible_user: | |
ansible_ssh_pass: | |
ansible_become_pass: | |
ansible_network_os: ios | |
ansible_connection: network_cli | |
ansible_become_method: enable | |
ansible_ssh_common_args: '-o KexAlgorithms=diffie-hellman-group1-sha1 -o HostKeyAlgorithms=ssh-rsa -o StrictHostKeyChecking=no -c aes256-cbc,aes192-cbc,aes128-cbc,3des-cbc' | |
banner: | | |
. |\__/ | ( \ | |
. _ |o o |_ ) ) | |
.-(((---(((----------------------------------+ | |
UNAUTHORIZED ACCESS TO THIS DEVICE IS PROHIBITED | |
You must have explicit, authorized permission to | |
access or configure this device. Unauthorized | |
attempts and actions to access or use this system | |
may result in civil and/or criminal penalties. | |
All activities performed on this device are logged | |
and monitored. | |
.--------------------------------------------+ | |
tasks: | |
- name: Configure the login banner | |
cisco.ios.ios_banner: | |
banner: login | |
text: "{{ banner }}" | |
state: present | |
become: true | |
- name: Create link aggregation group | |
cisco.ios.ios_linkagg: | |
group: 10 | |
state: present | |
- name: Override device configuration of all lacp_interfaces with provided configuration | |
cisco.ios.ios_lacp_interfaces: | |
config: | |
- name: GigabitEthernet1/0/1 | |
port_priority: 20 | |
- name: Port-channel10 | |
max_bundle: 2 | |
state: overridden | |
- name: Save running to startup when changed | |
cisco.ios.ios_config: | |
save_when: changed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment