forked from codecowboydotio/ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
csr1000v.yml
36 lines (36 loc) · 1006 Bytes
/
csr1000v.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
- hosts: "csr1000v"
connection: local
vars:
device_info:
host: "{{ inventory_hostname }}"
username: codecowboy
password: Codecowboy12
# authorize: yes
#auth_pass: password
transport: cli
timeout: 30
tasks:
- name: Bring up secondary interface
ios_config:
parents: "interface GigabitEthernet2"
lines:
- shutdown
- no ip address
provider: "{{ device_info }}"
register: result
# - debug: var=result
- name: configure the login banner
ios_banner:
banner: login
text: |
------------------------------------------
This banner was set by Ansible
....tell me this doesn't remove drudgery
------------------------------------------
state: present
provider: "{{ device_info }}"
# - name: configure the login banner
# ios_banner:
# banner: login
# state: absent
# provider: "{{ device_info }}"