This repository has been archived by the owner on Oct 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
pb.removevlans.yml
49 lines (43 loc) · 1.64 KB
/
pb.removevlans.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
40
41
42
43
44
45
46
---
- name: remove vlans on QFX10k
hosts: QFX10k
connection: local
gather_facts: no
tasks:
- name: Backup locally the configuration. Render the template. Push the rendered template. Commit.
junos_template:
provider: "{{ credentials }}"
src: "{{ playbook_dir }}/templates/10kremovevlans.j2"
comment: "configuration from Ansible using pb.remove.vlans"
backup: true
config_format: set
- name: Send Slack notification
local_action:
module: slack
icon_url: "https://www.ansible.com/hs-fs/hub/330046/file-448313641-png/favicon.png"
token: T2MBN64JX/B7HR6LQMS/b3PLhcxoDg1RwXZq0N0QSpgg
username: "Ansible on {{ inventory_hostname }}"
channel: code
msg: "configuration committed successfully using pb.removevlans.yml"
validate_certs: false
- name: remove vlans on QFX5k
hosts: QFX5k
connection: local
gather_facts: no
tasks:
- name: Backup locally the configuration. Render the template. Push the rendered template. Commit.
junos_template:
provider: "{{ credentials }}"
src: "{{ playbook_dir }}/templates/5kremovevlans.j2"
comment: "configuration from Ansible using pb.removevlans"
backup: true
config_format: set
- name: Send Slack notification
local_action:
module: slack
icon_url: "https://www.ansible.com/hs-fs/hub/330046/file-448313641-png/favicon.png"
token: T2MBN64JX/B7HR6LQMS/b3PLhcxoDg1RwXZq0N0QSpgg
username: "Ansible on {{ inventory_hostname }}"
channel: code
msg: "configuration committed successfully using pb.removevlans.yml"
validate_certs: false