-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from MitchV85/autovpn-lab
AutoVPN Deployment Guide: cLab Topology and Configs
- Loading branch information
Showing
34 changed files
with
3,801 additions
and
43 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
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 |
---|---|---|
@@ -1,45 +1,16 @@ | ||
[defaults] | ||
|
||
# Disable host key checking by the underlying tools Ansible uses to connect to target hosts | ||
host_key_checking = False | ||
|
||
# Location of inventory file containing target hosts | ||
inventory = ./inventory/inventory.yml | ||
|
||
# Only gather Ansible facts if explicity directed to in a given play | ||
gathering = explicit | ||
|
||
# Disable the creation of .retry files if a playbook fails | ||
retry_files_enabled = False | ||
|
||
# Path(s) to search for installed Ansible Galaxy Collections | ||
collections_paths = ~/.ansible/collections | ||
|
||
# Enable additional Jinja2 Extensions (https://jinja.palletsprojects.com/en/3.1.x/extensions/) | ||
roles_path = ./roles | ||
collections_paths = ../ansible-avd:../ansible-cvp:../ansible_collections:~/.ansible/collections:/usr/share/ansible/collections | ||
jinja2_extensions = jinja2.ext.loopcontrols,jinja2.ext.do,jinja2.ext.i18n | ||
deprecation_warnings = False | ||
forks = 8 | ||
host_key_checking = False | ||
|
||
# Enable the YAML callback plugin, providing much easier to read terminal output. (https://docs.ansible.com/ansible/latest/plugins/callback.html#callback-plugins) | ||
# stdout_callback = yaml | ||
|
||
# Permit the use of callback plugins when running ad-hoc commands | ||
bin_ansible_callbacks = True | ||
|
||
# List of enabled callbacks. Many callbacks shipped with Ansible are not enabled by default | ||
callbacks_enabled = profile_roles, profile_tasks, timer | ||
|
||
# Maximum number of forks that Ansible will use to execute tasks on target hosts | ||
forks = 15 | ||
|
||
# Disable cowsay (Why?) | ||
nocows = True | ||
|
||
[paramiko_connection] | ||
# Automatically add the keys of target hosts to known hosts | ||
host_key_auto_add = True | ||
vars_plugins_enabled = arista.avd.global_vars, host_group_vars | ||
|
||
[persistent_connection] | ||
# Set the amount of time, in seconds, to wait for response from remote device before timing out persistent connection. | ||
command_timeout = 60 | ||
connect_timeout = 120 | ||
command_timeout = 120 | ||
|
||
# Set the amount of time, in seconds, that a persistent connection will remain idle before it is destroyed. | ||
connect_timeout = 60 | ||
[vars_global_vars] | ||
paths = ../global_vars/evpn_vxlan, ../global_vars/avd_defaults, ../global_vars/fabric_defaults |
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
9 changes: 9 additions & 0 deletions
9
tech-library/wan/autovpn/zbackend-infra/act/host_networking.yml
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,9 @@ | ||
hostnets: | ||
HOSTA1: | ||
int: et1 | ||
ip: 10.10.10.101 | ||
gw: 10.10.10.1 | ||
HOSTA2: | ||
int: et1 | ||
ip: 10.20.20.101 | ||
gw: 10.20.20.1 |
3 changes: 3 additions & 0 deletions
3
tech-library/wan/autovpn/zbackend-infra/act/inventory/group_vars/endhosts.yml
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,3 @@ | ||
ansible_user: ansible | ||
ansible_password: ansible | ||
ansible_python_interpreter: $(which python3) |
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
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,20 @@ | ||
--- | ||
|
||
- name: Push switch configs | ||
hosts: all | ||
gather_facts: false | ||
|
||
vars: | ||
ansible_python_interpreter: /usr/bin/python3 | ||
config_dir: "{{ playbook_dir }}/../configs/" | ||
vars_files: | ||
- "./host_networking.yml" | ||
tasks: | ||
|
||
- name: "Configure et1 ip address" | ||
ansible.builtin.shell: | | ||
ip addr add {{ hostnets[inventory_hostname].ip }} dev {{ hostnets[inventory_hostname].int }} | ||
ip route add 10.40.40.0/24 via {{ hostnets[inventory_hostname].gw }} | ||
register: test | ||
become: yes | ||
when: "{{ 'HOST' in inventory_hostname }}" |
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,16 @@ | ||
.PHONY: help | ||
help: ## Display help message | ||
@grep -E '^[0-9a-zA-Z_-]+\.*[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
.PHONY: push-configs | ||
push-configs: ## Push configs to lab | ||
ansible-playbook config_push.yml | ||
|
||
.PHONY: grab-configs | ||
grab-configs: ## Grab configs from the lab | ||
ansible-playbook config_grab.yml | ||
|
||
.PHONY: push-license | ||
push-license: ## Push license to CloudEOS nodes | ||
pip3 install paramiko ansible-pylibssh | ||
ansible-playbook push_license.yml -e ansible_connection=network_cli |
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,17 @@ | ||
[defaults] | ||
roles_path = ./roles | ||
inventory = inventory/inventory.yml | ||
collections_paths = ../ansible-avd:../ansible-cvp:../ansible_collections:~/.ansible/collections:/usr/share/ansible/collections | ||
jinja2_extensions = jinja2.ext.loopcontrols,jinja2.ext.do,jinja2.ext.i18n | ||
deprecation_warnings = False | ||
forks = 8 | ||
host_key_checking = False | ||
|
||
vars_plugins_enabled = arista.avd.global_vars, host_group_vars | ||
|
||
[persistent_connection] | ||
connect_timeout = 120 | ||
command_timeout = 120 | ||
|
||
[vars_global_vars] | ||
paths = ../global_vars/evpn_vxlan, ../global_vars/avd_defaults, ../global_vars/fabric_defaults |
Oops, something went wrong.