Adding Netbox
This commit is contained in:
21
roles/ansible-network.config_manager/tasks/main.yml
Normal file
21
roles/ansible-network.config_manager/tasks/main.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
# tasks file for ansible-network.config_manager
|
||||
#
|
||||
- name: initialize function
|
||||
include_tasks: includes/init.yaml
|
||||
|
||||
- name: set role supported functions
|
||||
set_fact:
|
||||
config_manager_functions:
|
||||
- get
|
||||
- load
|
||||
- save
|
||||
- noop
|
||||
|
||||
- name: validate the requested function is supported
|
||||
fail:
|
||||
msg: "invalid function specified, expected one of {{ config_manager_functions }}, got {{ function }}"
|
||||
when: function | default('noop') not in config_manager_functions
|
||||
|
||||
- name: include function specific tasks and run
|
||||
include_tasks: "{{ function | default('noop') }}.yaml"
|
||||
Reference in New Issue
Block a user