Adding Netbox

This commit is contained in:
Patrick Toal
2019-05-06 00:34:45 -04:00
parent 832502de34
commit 6e2205a046
278 changed files with 12767 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
- hosts: localhost
connection: local
roles:
- vlan_expand

View File

@@ -0,0 +1,7 @@
---
- name: import dependency role for test
import_role:
name: "{{ role_path.split('/tests/vlan_expand/vlan_expand')[0] }}"
- name: vlan_expand test
import_tasks: vlan_expand.yaml

View File

@@ -0,0 +1,35 @@
---
- name: vlan_expand single vlan
debug:
msg: "{{ 'vlan1' | vlan_expand }}"
register: result
- assert:
that:
- "'1' in result.msg"
- name: vlan_expand range of vlans1
debug:
msg: "{{ 'vlan1-5' | vlan_expand }}"
register: result
- assert:
that:
- "'1' in result.msg"
- "'2' in result.msg"
- "'3' in result.msg"
- "'4' in result.msg"
- "'5' in result.msg"
- name: vlan_expand range of vlans2
debug:
msg: "{{ 'vlan1,3-5,7' | vlan_expand }}"
register: result
- assert:
that:
- "'1' in result.msg"
- "'3' in result.msg"
- "'4' in result.msg"
- "'5' in result.msg"
- "'7' in result.msg"