Adding Netbox
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
---
|
||||
- set_fact:
|
||||
test: string
|
||||
|
||||
- set_fact:
|
||||
test_pass: "{{ lookup('config_template', 'pass.j2') }}"
|
||||
test_fail: "{{ lookup('config_template', 'fail.j2') }}"
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "'test string' in test_pass"
|
||||
- "'test string' not in test_fail"
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: import dependency role for test
|
||||
import_role:
|
||||
name: "{{ role_path.split('/tests/config_template/config_template')[0] }}"
|
||||
|
||||
- name: config_template test
|
||||
import_tasks: config_template.yaml
|
||||
@@ -0,0 +1 @@
|
||||
test {{ bad | default(omit) }}
|
||||
@@ -0,0 +1 @@
|
||||
test {{ test }}
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
connection: local
|
||||
roles:
|
||||
- config_template
|
||||
Reference in New Issue
Block a user