Compare commits
2 Commits
3c82f914db
...
4146448a9d
| Author | SHA1 | Date | |
|---|---|---|---|
| 4146448a9d | |||
| f9240e2ed7 |
@ -17,7 +17,7 @@ all:
|
||||
ansible_aoscx_validate_certs: False
|
||||
ansible_aoscx_use_proxy: False
|
||||
ansible_acx_no_proxy: True
|
||||
ansible_ssh_common_args: "-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
|
||||
ansible_ssh_common_args: "-o PreferredAuthentications=password -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@ -88,16 +88,6 @@ salem_h:
|
||||
salem_h-4507-1:
|
||||
ansible_host: 192.168.30.1
|
||||
building_name: salem_h
|
||||
mckin:
|
||||
hosts:
|
||||
mckin-4507-1:
|
||||
ansible_host: 192.168.36.1
|
||||
building_name: mckin
|
||||
meach:
|
||||
hosts:
|
||||
meach-4507-1:
|
||||
ansible_host: 192.168.37.1
|
||||
building_name: meach
|
||||
porter:
|
||||
hosts:
|
||||
porter-4507-1:
|
||||
@ -123,11 +113,6 @@ beard:
|
||||
beard-mdf-4507:
|
||||
ansible_host: 192.168.48.1
|
||||
building_name: beard
|
||||
vanduyn:
|
||||
hosts:
|
||||
vanduyn-mdf-4507:
|
||||
ansible_host: 192.168.49.1
|
||||
building_name: vanduyn
|
||||
webster:
|
||||
hosts:
|
||||
webster-4507-1:
|
||||
|
||||
@ -244,6 +244,36 @@ lucy:
|
||||
ansible_host: 10.86.254.254
|
||||
building_name: lucy
|
||||
serial_num: SG37LP00MT
|
||||
mckin:
|
||||
hosts:
|
||||
mckin-idf1-a6300-sw1:
|
||||
ansible_host: 192.168.36.211
|
||||
building_name: mckin
|
||||
serial_num: VN55M3P2YB
|
||||
mckin-idf2-a6300-sw1:
|
||||
ansible_host: 192.168.36.221
|
||||
building_name: mckin
|
||||
serial_num: VN55M3P312
|
||||
mckin-idf3-a6300-sw1:
|
||||
ansible_host: 192.168.36.231
|
||||
building_name: mckin
|
||||
serial_num: VN55M3P1RF
|
||||
mckin-idf4-a6300-sw1:
|
||||
ansible_host: 192.168.36.241
|
||||
building_name: mckin
|
||||
serial_num: VN55M3P2X4
|
||||
mckin-mdf-a6300-sw1:
|
||||
ansible_host: 192.168.36.205
|
||||
building_name: mckin
|
||||
serial_num: VN55M3P2Y9
|
||||
mckin-mdf-a8360-sw1:
|
||||
ansible_host: 10.36.254.253
|
||||
building_name: mckin
|
||||
serial_num: SG48LP00C1
|
||||
mckin-mdf-a8360-sw2:
|
||||
ansible_host: 10.36.254.254
|
||||
building_name: mckin
|
||||
serial_num: SG41L5K07J
|
||||
meach:
|
||||
hosts:
|
||||
meach-idf1-a6300-sw1:
|
||||
@ -408,10 +438,6 @@ sh:
|
||||
ansible_host: 192.168.114.24
|
||||
building_name: sh
|
||||
serial_num: SG37LP101Y
|
||||
sh-noc-a8360-datacenter:
|
||||
ansible_host: 192.168.114.238
|
||||
building_name: sh
|
||||
serial_num: SG36LNZ0XM
|
||||
sh-noc-ilo-a6300-a:
|
||||
ansible_host: 192.168.114.19
|
||||
building_name: sh
|
||||
|
||||
@ -8,6 +8,6 @@ done
|
||||
ansible-playbook -e "ansible_user=$USERNAME" -e "ansible_password=$PASSWORD" -i inventory.yml backup_configs.yml
|
||||
#ansible-playbook -e "ansible_user=$DFLT_USERNAME ansible_password=$DFLT_PASSWORD" -i inventory.yml -l @backup_configs.retry backup_configs.yml
|
||||
|
||||
run_backup_wlcs.sh
|
||||
/work/run_backup_mx.sh
|
||||
|
||||
chown -R 1000:1000 /configs/
|
||||
|
||||
14
code/run_backup_mx.sh
Executable file
14
code/run_backup_mx.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
ssh -i ~/.ssh/id-rsa -o PreferredAuthentications=publickey johnp@192.168.1.9 "show configuration | display set " >/tmp/noc-jmx-104-b.set
|
||||
ssh -i ~/.ssh/id-rsa -o PreferredAuthentications=publickey johnp@192.168.1.10 "show configuration | display set" >/tmp/noc-jmx-104-a.set
|
||||
for fn in noc-jmx-104-a.set noc-jmx-104-b.set ; do
|
||||
|
||||
size=$(stat -c %s /tmp/$fn)
|
||||
if (( $size > 0 ));then
|
||||
mv /tmp/$fn /configs/mx
|
||||
else
|
||||
rm /tmp/$fn
|
||||
fi
|
||||
|
||||
done
|
||||
Loading…
x
Reference in New Issue
Block a user