Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

inventory

TiTom edited this page Nov 22, 2016 · 1 revision

Inventory files

Inventory is stored in the hosts.ini file. In order to work, your inventory file must follow structure below:

########################
## All Lab devices    ##
########################
[all:children]
ztp-servers
ex
ansible-servers

########################
## ZTP devices        ##
########################

[ztp-servers]
ztp01       ansible_host=10.73.1.196

[ztp-servers:vars]
ansible_connection=ssh
ansible_ssh_user=ansible
ansible_ssh_pass='password123'
ansible_sudo_pass='password123'

[ansible-servers]
ansible01       ansible_host=127.0.0.1

Then, as DHCP server will push information on a per host basis, we have to define mac_address for each host managed by ZTP. Software package is also required to fullfil dhcpd configuration. So you have to add the following variable for your junos devices:

########################
## Junos devices      ##
########################
[ex]
FR-EX2200-110       junos_host=10.73.1.8    loopback_ip=100.0.0.1       mgmt_port=me0   mac_address=2c:6b:f5:3a:1d:7f

[ex:vars]
junos_version= "12.3R3.4"
junos_package= "jinstall-ex-2200-12.3R3.4-domestic.tgz"

Structure of this inventory file is based on the syntax used in the EVPN/VXLAN repository. It means, you can easily merge both project to setup a complete POC.

Clone this wiki locally