Sample project using Ansible to setup and manage a ZTP server for use with Mellanox Oynx-based network switches.
In this project you'll find:
- (1) A role to install all software on the remote server with Playbooks and variables based on Ubuntu/Debian system.
- (2) Severals ansible roles packaged and documented into Ansible roles to configure DHCP server and to deploy configuration files on all remote ZTP servers (FTP).
- (3) Examples of ZTP configurations files.
- (4) Playbook to play with ZTP roles and update ZTP in a more complex project.
- (5) A simple example playbook to configure a Mellanox Oynx-based network switch post-ZTP boot up.
This project is managing the creation of a ZTP server running on a Debian like OS
ISC-DHCP-Server
is used as part of the DHCP server to provide IP address on the management network.VSFTPd
is used to publish device's configuration and software packages.
All devices names, Ip addresses loopback addresses etc .. are defined in the inventory file named "hosts".
Available playbooks are listed below:
playbook-ztp-setup
: Setup all softwares on a single or multiple ZTP servers (inc. isc-dhcp-server and vsftpd)playbook-ztp-init
: Prepare a local configuration repository for configuration file creation and supporting filesplaybook-mlnx-oynx-conf-generate.yml
: Playbook to generate default configuration files for Mellanox Oynx network devicesplaybook-ztp-conf-generate
: Create configuration for ZTP (specifically dhcpd.conf file) and store files on a local basisplaybook-ztp-push-data
: Push configuration files generated byplaybook-ztp-conf-generate
and supporting files to remote ztp server(s)playbook-ztp-complete
: Execute all the above actions in one playbookplaybook-set-int-speed
: Example playbook which uses Mellanox Oynx network modules to do basic configuration of a switches booted using ZTP
All variables are stored in the hosts file and vars.yaml and ztp-variables.yaml.
Please refer to the file CONTRIBUTING.md for contribution guidelines.
This work is partially-based on initial work by titom73 (GitHub respository)