-
Notifications
You must be signed in to change notification settings - Fork 5
/
3_gold_config.yml
60 lines (51 loc) · 1.31 KB
/
3_gold_config.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
---
- name: Check if devices match the Gold config
hosts: nx
gather_facts: no
tasks:
- name: Check gold config status
nxos_config:
lines:
- clock timezone PST 8 0
- logging timestamp milliseconds
- no ip source-route
backup: yes
when: ansible_network_os == 'nxos'
- name: Set domain attributes
nxos_system:
domain_lookup: False
domain_name: "{{domain_name}}"
- name: Set standard logging settings
nxos_logging:
aggregate:
- { dest: console, dest_level: 7 }
- { dest: logfile, dest_level: 6, name: mylog }
state: present
- name: Enable standard features
loop:
- scp-server
- sftp-server
- interface-vlan
nxos_feature:
feature: "{{item}}"
state: enabled
- name: Configure VTY and console
when: ansible_network_os == 'nxos'
loop:
- line vty
- line console
nxos_config:
lines:
- exec-timeout 525600
parents: "{{ item }}"
- name: Set NTP
when: ansible_network_os == 'nxos'
loop: "{{ ntp_servers }}"
nxos_config:
lines:
- ntp server {{ item }} use-vrf default
- name: Create temp user
when: ansible_network_os == 'nxos'
nxos_config:
lines:
- username deleteme password C1s462342fd role network-admin