Forum Discussion
Checking Image versions on multiple F5 Devices
Hi BabaG,
If you have a jump server, the job is easier.
Requirements:
- Jump Server having reachability to all your remote F5 servers.
- Have the passwordless login set up if not done already. You can refer internet on how to have passwordless login from a particular account. Or worst case, have a sshpass method used.
- A bash script.
- A list of F5 servers.
Create a simple bash script like below in your Jump server, lets say we name it version-script.
Paste the below code in the version-script. For now we have our scripts in /var/tmp/.
Jumpserver# vi version-script
#!/usr/bin/bash
version="$(cat /VERSION | grep Version)"
echo $HOSTNAME,$version
Have a list of servers added in the file - /var/tmp/serverlist.txt.
Now comes the execution part for multiple devices, I've put root user assuming you have the root's key already exchanged for passwordless login. You can change accordingly.
Create the executable script, named as run-script. Paste the below code in the run-script.
Jumpserver# vi run-script
echo "HOSTNAME,Version" > /var/tmp/F5-version-report.csv
for i in `cat /var/tmp/serverlist.txt`;
do
ssh root@$i "-o StrictHostKeyChecking=no" "bash -s" < ./version-script >> /var/tmp/F5-version-report.csv
done
All set and done, Just have the script executed (run-script).
bash run-script
Your outputs will be saved in /var/tmp/ location with the file named F5-version-report.csv. The good part is, its in csv format, so you can simply open in the excel sheet and use it for audit purpose.
- BabaGSep 11, 2019
Nimbostratus
Many thanks for the solutions, I did not have access to jumpServer since, reason I haven't test the solutions or reply for the confirmation
I have now able to test and I can confirm it works as you have shown
Many thanks once again and appreciated greatly!!
Regards
Baba
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com