forked from IPvZero/IPvZero
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAnsible Debugger.yml
36 lines (29 loc) · 1016 Bytes
/
Ansible Debugger.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
---
- name: "Initialising Ansible"
hosts: localhost
tasks:
- name: "Job 1 of PLAY 1: Enumerating Time/Date..."
setup:
filter: "ansible_date_time"
gather_subset: "!all"
- name: "Job 2 of PLAY 1: Recording Information as variable: TD"
set_fact:
TD: "{{ ansible_date_time.date }}"
- name: "PLAY 2: Capturing Current Configurations For Comparison..."
hosts: all
connection: network_cli
tasks:
- name: "Job 1 of PLAY 2: Grabbing Runnings Configs!"
ios_command:
commands:
- show run
register: response
- name: "Job 2 of PLAY 2: Creating COMPARISON Subfolder..."
file:
path: "~/Calendar/{{hostvars.localhost.TD}}/COMPARISON"
state: directory
run_once: true
- name: "Job 3 of PLAY 2: Piping STDOUT to target subfolder..."
copy:
content: "{{ response.stdout[0] }}\n"
dest: "~/Calendar/{{hostvars.localhost.TD}}/COMPARISON/{{ inventory_hostname }}-running-config.txt"