-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathplaybook-ztp-complete.yml
46 lines (42 loc) · 1.32 KB
/
playbook-ztp-complete.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
---
### Role to setup all packages on the remote server to run ZTP server
### Setup following packages: isc-dhcp-server / vsftpd
### Enable anonymous access to FTP
### Create simple DHCP configuration
- name: 01 - Initiate ZTP Setup
hosts: ztp-servers
connection: ssh
gather_facts: no
roles:
- {role: ztp-install-packages, become: yes}
### Setup Local directory structure to store files locally
- name: 02 - Init ZTP directory strucutre to store local files
hosts: ansible-servers
connection: local
gather_facts: no
roles:
- {role: ztp-init}
### Create configuration files locally
- name: 03 - Populate configuration for Mellanox Oynx devices
hosts: devices
connection: local
gather_facts: no
vars_files:
- "group_vars/all/ztp-variables.yaml"
- "group_vars/mlnx-oynx/mlnx-oynx-conf-generator.yaml"
roles:
- {role: mlnx-oynx-conf-generator}
### Create configuration files locally
- name: 04 - Populate local ZTP configurations and build DHCPd configuration
hosts: all:!ztp-servers
connection: local
gather_facts: no
roles:
- {role: ztp-create-config}
### Send files to ZTP servers
- name: 04 - Send ZTP configurations to server
hosts: ztp-servers
connection: ssh
gather_facts: no
roles:
- {role: ztp-push-dhcp, become: yes}