Tested current IOS playbook

This commit is contained in:
Vlad Raducanu 2022-05-07 16:54:22 +01:00
parent 8efdffa137
commit 94ab963e73
8 changed files with 30 additions and 19 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
ios_devices/device_backups
linux-ubuntu/.DS_Store

View File

@ -2,7 +2,7 @@
## This playbook collects the device facts and prints out key information
- name: Audit devices and print key information
hosts: homekit
hosts: baguleykit
gather_facts: false
connection: network_cli
roles:

View File

@ -2,7 +2,7 @@
## This playbook backs up the device configuration to a specific folder and tags it with timestamps
- name: Backup device configuration with timestamps
hosts: homekit
hosts: baguleykit
gather_facts: false
connection: network_cli
roles:
@ -23,6 +23,6 @@
ios_config:
backup: yes
backup_options:
dir_path: ../../ansible_backups/
dir_path: device_backups/
filename: "{{ current_config.ansible_facts.ansible_net_hostname }}-{{ '%Y-%m-%d' | strftime }}-{{ '%H:%M:%S' | strftime }}.backup"

View File

@ -1,6 +1,6 @@
baguleykit:
hosts:
172.16.1.254:
172.16.1.175:
homekit:
hosts:

View File

@ -1,13 +1,14 @@
$ANSIBLE_VAULT;1.1;AES256
38336132353035343631653464326665616635363064623564613030383231633135376264306634
6233303232383865303265363261356632383237373861370a343433333839356534323738646666
66613065346138356261346362343436366231613131336531653436356363613339643831663836
3936366331323537370a316639333639646434323937303937626132363730363136613336313763
61346432323133326665653562663161633661653730613930303133333362643837393636383235
34333738343261346362616239656264393262343731656566323233316262303866653530393839
63336536366138633833383534656430373165663439643464376439666337616331343565646363
61636261383531623535353964626435376336633234343134373865613437363231623839303964
34356133326664616564623538366536313334626664613939343366326263613334383132383536
30303334336432353238333231323935313932633562383232303366343466303034613933643964
35306637663431363932353338633163363966636366366438336431666631363134373964643731
62333761616334323562
36346232356431333538393163356337316264323466613066386161383765613837313361623732
3933393635653661653234663932386231386462636633310a393465383862313435626439396635
38623336326432666664616264303364313862616130656265363530643664666464646662653437
3764366163333936300a616235666566333930643638353862636530306633343434333733626365
63393336366331323039303938623834343663346161383536623439346165303162363032353166
31303439383865646533663238336639366134323834326335336261646136306634333639313661
39663862363137646230663363333530316338393764373339636662626566393332643362363634
64663261393366613130616463383034383066333763666564346335643634626138633165366531
30386238373232333732316534623665333466626130363965303431636633653364376531616632
64393363646135396566653233653538633536376666353734386665346634666133653434656333
32333736346362626461643162646633646537396263386536336134636661646563313264616436
30316665303963323733353734333863366235393863653039306236303162383732393862643064
3861

View File

@ -2,7 +2,7 @@
## Playbook for reading and printing device information
- name: Collect device facts and print formatted and unformatted information
hosts: homekit
hosts: baguleykit
gather_facts: false
connection: network_cli
roles:

View File

@ -1,7 +1,7 @@
---
- name: Test playbook - reads and prints device info
hosts: homekit
hosts: baguleykit
gather_facts: false
connection: network_cli
roles:

View File

@ -11,4 +11,12 @@
reboot:
reboot_timeout: 60
msg: Reboot issued by Ansible
test_command: whoami
test_command: whoami
- name: Send Webex Teams message via BOT to confirm playbook completion
community.general.cisco_webex:
recipient_type: toPersonEmail
recipient_id: "{{ webex_id }}"
msg_type: markdown
personal_token: "{{ webex_token }}"
msg: "**Host {{ inventory_hostname }} has successfully rebooted.**"