This repository has been archived by the owner on Jun 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add specific role to build demo environment
- Loading branch information
TiTom
committed
Nov 17, 2016
1 parent
74a9b9d
commit 47606ca
Showing
4 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
### Setup local files to run demo in Paris office | ||
- name: Populate ZTP repository to provide demo in France LAB | ||
hosts: ansible-servers | ||
connection: local | ||
gather_facts: no | ||
roles: | ||
- {role: ztp-demo-lab-fr} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
version 12.3R3.4; | ||
system { | ||
host-name FR-EX2200-110; | ||
time-zone Europe/Paris; | ||
root-authentication { | ||
encrypted-password "$1$vS28RTDq$z1zqSHDo9jKT.pKuv8VzR."; ## SECRET-DATA | ||
} | ||
name-server { | ||
8.8.8.8; | ||
} | ||
services { | ||
ssh { | ||
root-login allow; | ||
max-sessions-per-connection 32; | ||
} | ||
netconf { | ||
ssh; | ||
} | ||
} | ||
syslog { | ||
host 172.26.34.142 { | ||
any any; | ||
} | ||
file default-log-messages { | ||
any any; | ||
inactive: match "(requested 'commit' operation)|(copying configuration to juniper.save)|(commit complete)|ifAdminStatus|(FRU power)|(FRU removal)|(FRU insertion)|(link UP)|transitioned|Transferred|transfer-file|(license add)|(license delete)|(package -X update)|(package -X delete)|(FRU Online)|(FRU Offline)|(plugged in)|(unplugged)|cm_device|(Master Unchanged, Members Changed)|(Master Changed, Members Changed)|(Master Detected, Members Changed)|(vc add)|(vc delete)|(Master detected)|(Master changed)|(Backup detected)|(Backup changed)|(interface vcp-)\n "; | ||
structured-data; | ||
} | ||
} | ||
} | ||
interfaces { | ||
me0 { | ||
unit 0 { | ||
family inet { | ||
address 10.73.1.110/24; | ||
} | ||
} | ||
} | ||
} | ||
snmp { | ||
trap-group space { | ||
targets { | ||
172.30.108.80; | ||
172.30.108.78; | ||
172.30.109.95; | ||
172.30.109.80; | ||
} | ||
} | ||
} | ||
protocols { | ||
rstp; | ||
lldp { | ||
interface all; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
######################## | ||
## All Lab devices ## | ||
######################## | ||
[all:children] | ||
ztp-servers | ||
ex | ||
ansible-servers | ||
|
||
######################## | ||
## 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" | ||
|
||
######################## | ||
## ZTP devices ## | ||
######################## | ||
|
||
[ztp-servers] | ||
ztp01 ansible_host=10.73.1.254 | ||
|
||
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
- name: Move configuration for FR-EX2200-110 to junos_local | ||
copy: | ||
src: "{{ role_path }}/files/FR-EX2200-110.conf" | ||
dest: "{{playbook_dir}}/{{ztp.path.junos_local}}/FR-EX2200-110.conf" | ||
|
||
- name: Update inventory file | ||
copy: | ||
src: "{{ role_path }}/files/hosts.ini" | ||
dest: "{{playbook_dir}}/hosts.ini" |