forked from dgarros/nanog77-tsdb-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pb.config.network.yaml
32 lines (27 loc) · 914 Bytes
/
pb.config.network.yaml
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
- name: Deploy Configurations for Network Devices
hosts: [ junos, eos, iosxr ]
gather_facts: no
tasks:
- name: Generate Configuration
template:
src: "{{ansible_network_os}}.j2"
dest: "configs/generated/{{inventory_hostname}}.conf"
mode: 0644
delegate_to: localhost
tags: [ generate ]
- name: Deploy Junos configuration
junos_config:
src: "configs/generated/{{inventory_hostname}}.conf"
update: merge
when: ansible_network_os == 'junos'
- name: Deploy EOS configuration
eos_config:
src: "configs/generated/{{inventory_hostname}}.conf"
replace: config
when: ansible_network_os == 'eos'
- name: Deploy IOS_XR Configuration
iosxr_config:
src: "configs/generated/{{inventory_hostname}}.conf"
replace: config
become: yes
when: ansible_network_os == 'iosxr'