Skip to content

tomclark0/ansible-onie-ztp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible-ztp-onie

This playbook provides DHCP and a webserver for ZTP and reimaging of ONIE based switches. It's goal is to aid bootstrapping switches for further programmatic configuration, e.g. ansible.

It makes use of:

The webserver is exposed on 8080/tcp

The playbook has been tested on:

  • Rocky Linux 9 host
  • Migration of Cumulus Linux 5.6 -> 5.11

TODO

This met the minimum requirements, but could be improved upon Initial thoughts:

  • Template ZTP script
    • Move vars to ansible
    • Read public key(s) from file(s)

Dependencies

  • The playbook is expected to be run against localhost.
  • Localhost sits on the same L2 domain as the switch(es).
  • There are no other DHCP servers in this L2 domain.
  • (Optional) The MAC address of the mgmt interface is known.

Quickstart

  • Clone the repo
  • Adjust values in defaults/main.yml
    • It is suggested to delegate fixed switch IPs outside of the dynamic DHCP range. This ensures any rogue DHCP client is non-interfering.
  • A venv is recommended.
python -m venv provision
source provision/bin/activate
pip install -r requirements.txt
ansible-galaxy install -r requirements.yml
  • Customise the ZTP script and/or place an ONIE image in the serve directory

To start ansible-playbook main.yml -t start

After provisioning ansible-playbook main.yml -t stop

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors