-
Notifications
You must be signed in to change notification settings - Fork 9
/
ios-engine-csv-template.yml
39 lines (33 loc) · 1.04 KB
/
ios-engine-csv-template.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
- name: Apply or remove standard router template with config_manager
hosts: ios
connection: network_cli
gather_facts: no
vars:
csvfile: "{{ lookup('file', '{{ playbook_dir }}/csv-files/loopbacks.csv') }}"
thestate: add
tasks:
# - name: CONFIGURING LOOPBACK INTERFACES
# template:
# src: templates/loopbacks.j2
# dest: loopbacks.cfg
# delegate_to: localhost
- name: Turn off dns lookup
ios_config:
lines: no ip domain lookup
- name: Apply standard router template
include_role:
name: ansible-network.config_manager
tasks_from: load
vars:
config_manager_file: "{{ playbook_dir }}/templates/ios/greenfield_template.j2"
config_manager_replace: False
when: thestate == "add"
- name: Remove standard router template
include_role:
name: ansible-network.config_manager
tasks_from: load
vars:
config_manager_file: "{{ playbook_dir }}/templates/ios/remove_greenfield_template.j2"
config_manager_replace: False
when: thestate == "remove"