forked from ksator/openconfig-demo-with-juniper-devices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pb.conf.interfaces.yml
28 lines (23 loc) · 891 Bytes
/
pb.conf.interfaces.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
---
- name: create interfaces configuration
hosts: Openconfig_Routers
connection: local
gather_facts: no
tags:
- configuration
tasks:
- name: Push on interfaces config from templates, and commit.
junos_template:
#http://docs.ansible.com/ansible/junos_template_module.html
provider: "{{ credentials }}"
src: "{{ playbook_dir }}/interfaces.j2"
comment: "interfaces configuration from Ansible"
- name: Send Slack notification to the team
local_action:
module: slack
#http://docs.ansible.com/ansible/slack_module.html
username: "Ansible on {{ inventory_hostname }}"
channel: openconfig
token: T2MBN64JX/B2N0Z2MEU/1OoB46XLX6Q1oFf89Xl2X9gq
icon_url: "https://www.ansible.com/hs-fs/hub/330046/file-448313641-png/favicon.png"
msg: "configuration commited using pb.conf.interfaces.yml"