Small house keeping changes - removed the save audit to file feature due to bad text output
This commit is contained in:
parent
94ab963e73
commit
d146a063a0
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
||||
ios_devices/device_backups
|
||||
linux-ubuntu/.DS_Store
|
||||
ios_devices/.DS_Store
|
||||
.DS_Store
|
||||
|
||||
@ -19,14 +19,14 @@
|
||||
debug:
|
||||
msg: "{{ current_config.ansible_facts.ansible_net_hostname }} is reachable and the OS is {{ current_config.ansible_facts.ansible_net_version }}. SN is {{ current_config.ansible_facts.ansible_net_serialnum }}. Model is {{current_config.ansible_facts.ansible_net_model }}"
|
||||
|
||||
- name: Collect interface, routing and IOX runtime information
|
||||
- name: Collect interface, routing and device runtime information
|
||||
ios_command:
|
||||
commands:
|
||||
- show ip interface brief
|
||||
- show interface description
|
||||
- show ip route
|
||||
- show ip arp
|
||||
- show iox
|
||||
- show version
|
||||
register: runtime_information
|
||||
|
||||
|
||||
@ -46,12 +46,6 @@
|
||||
debug:
|
||||
var: runtime_information.stdout_lines[3]
|
||||
|
||||
- name: Print IOx information
|
||||
- name: Print device indormation
|
||||
debug:
|
||||
var: runtime_information.stdout_lines[4]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var: runtime_information.stdout_lines[4]
|
||||
@ -1,29 +0,0 @@
|
||||
---
|
||||
## Playbook for reading and printing device information
|
||||
|
||||
- name: Collect device facts and print formatted and unformatted information
|
||||
hosts: baguleykit
|
||||
gather_facts: false
|
||||
connection: network_cli
|
||||
roles:
|
||||
- common
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Collect device configuration
|
||||
ios_facts:
|
||||
gather_subset: all
|
||||
register: current_config
|
||||
|
||||
- name: Print device identity info
|
||||
debug:
|
||||
msg: "{{ current_config.ansible_facts.ansible_net_hostname }} is reachable and the OS is {{ current_config.ansible_facts.ansible_net_version }}. SN is {{ current_config.ansible_facts.ansible_net_serialnum }}. Model is {{current_config.ansible_facts.ansible_net_model }}"
|
||||
|
||||
- name: Print contents of current_config object
|
||||
debug:
|
||||
var: current_config
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
---
|
||||
|
||||
- name: Test playbook - reads and prints device info
|
||||
hosts: baguleykit
|
||||
gather_facts: false
|
||||
connection: network_cli
|
||||
roles:
|
||||
- common
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Run "show version" command on devices
|
||||
ios_command:
|
||||
commands: show version
|
||||
register: output
|
||||
|
||||
- name: Print the output of "show version"
|
||||
debug:
|
||||
var: output.stdout_lines
|
||||
@ -1,3 +1,4 @@
|
||||
all:
|
||||
hosts:
|
||||
172.16.1.112:
|
||||
172.16.1.112:
|
||||
10.221.0.104:
|
||||
@ -23,6 +23,7 @@
|
||||
- tftpd-hpa
|
||||
- ntp
|
||||
- ufw
|
||||
- xrdp
|
||||
|
||||
- name: Create a new regular user with sudo privileges
|
||||
user:
|
||||
@ -54,6 +55,15 @@
|
||||
proto: udp
|
||||
- port: '23'
|
||||
proto: tcp
|
||||
- port: '3389'
|
||||
proto: tcp
|
||||
- port: '5140'
|
||||
proto: tcp
|
||||
- port: '5141'
|
||||
proto: tcp
|
||||
- port: '5142'
|
||||
proto: tcp
|
||||
|
||||
|
||||
- name: UFW - Deny all other incoming traffic by default
|
||||
ufw:
|
||||
@ -63,7 +73,7 @@
|
||||
|
||||
- name: Block all IPv6 incoming connections
|
||||
ufw:
|
||||
rule: block
|
||||
rule: deny
|
||||
direction: in
|
||||
proto: ipv6
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user