-
Notifications
You must be signed in to change notification settings - Fork 1
/
devnet.yml
94 lines (80 loc) · 2.39 KB
/
devnet.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
- name: General Config
hosts: Switches
tasks:
- name: Add Banner
ios_banner:
banner: login
text: |
$$$$$$\ $$\ $$\ $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$$$\ $$$$$$\ $$$$$$\
$$ __$$\ $$ | $\ $$ | $$ __$$\ $$ __$$\ $$ __$$\ $$ _____|$$ __$$\ $$ __$$\
$$ / \__|$$ |$$$\ $$ | $$ / $$ |$$ / \__|$$ / \__|$$ | $$ / \__|$$ / $$ |
\$$$$$$\ $$ $$ $$\$$ | $$$$$$$$ |$$ | $$ | $$$$$\ \$$$$$$\ $$ | $$ |
\____$$\ $$$$ _$$$$ | $$ __$$ |$$ | $$ | $$ __| \____$$\ $$ | $$ |
$$\ $$ |$$$ / \$$$ | $$ | $$ |$$ | $$\ $$ | $$\ $$ | $$\ $$ |$$ | $$ |
\$$$$$$ |$$ / \$$ | $$ | $$ |\$$$$$$ |\$$$$$$ |$$$$$$$$\ \$$$$$$ | $$$$$$ |
\______/ \__/ \__|$$$$$$\\__| \__| \______/ \______/ \________| \______/ \______/
\______|
state: present
- name: create a new user
ios_user:
name: angie.martinez
nopassword: True
sshkey: "cisco"
state: present
- name: create a new user
ios_user:
name: lorena.rodriguez
nopassword: True
sshkey: "cisco"
state: present
- name: create a new user
ios_user:
name: maritza.virviescas
nopassword: True
sshkey: "cisco"
state: present
- name: configure hostname and domain name
ios_system:
hostname: sw_acceso
domain_name: www.cloudflare.com
domain_search:
- ansible.com
- redhat.com
- cisco.com
name: configure name servers
ios_system:
name_servers:
- 1.1.1.1
- 8.8.8.8
- name: Create vlan
ios_vlan:
vlan_id: 200
name: ANSIBLE
state: present
- name: Add interfaces to VLAN
ios_vlan:
vlan_id: 200
interfaces:
- GigabitEthernet1/0
- GigabitEthernet1/1
- name: enable logging to all
ios_logging:
dest : on
- name: configure interface
ios_interface:
name: GigabitEthernet1/0
description: to_Users
speed: 1000
duplex: half-duplex
mtu: 512
- name: configure interface
ios_interface:
name: GigabitEthernet1/1
description: to_Users
speed: 1000
duplex: half-duplex
mtu: 512
- name: Add loopback
name: loopback 30
state: present