Forum Discussion
Unable to use ansible playbook to upgrade BIGIP - VE to 15.1.6.1 from 15.1.5.1
- Oct 27, 2022
Just for anyone else who read this, the issue was a local execution
connection: localthis causes the system to SSH to itself and there is no tmsh on the ansible host. removing this line and then adding delegate_to: localhost when calling a BIG-IP module solved this issue. it allows the playbook to remote execute the code via SSH
After removing it and fixing a few code tweaks we were able to launch the code
#!/bin/bash
OLDIFS="$IFS"
IFS=$'\n'
disk=$(/bin/tmsh show sys sof status | awk '/.D[1-9]/{print substr($1,1,4)}' | head -n1)
maxvnumber=0
for vnumber in $(/bin/tmsh show sys sof status | grep complete)
do
vnumber=${vnumber:4:2}
vnumber=${vnumber// /}
if (( vnumber > maxvnumber )); then
maxvnumber=$vnumber
fi
done
volume=$disk$((maxvnumber + 3))
echo -n $volume
IFS="$OLDIFS"Yes, I'm using admin account and pwd.
I can login directly to the F5 without any issues.
- Matt_MabisOct 20, 2022
Employee
OK i think that might be the issue, Typically the Admin account is logged in via TMSH console when SSHing into the box. you would be running native TMSH at that point. when i was running the SSH connection was done as Root to run the script with TMSH then the admin account is used to execute modules. The command we use above to run the script will SSH direct to the box and execute.. if you are already in TMSH, TMSH as a command doesnt exist.
Admin when SSH == TMSH
Root when SSH == Bash with TMSH capabilities
Does this make sense?
- vkrishna91Oct 20, 2022
Nimbostratus
Yes, it makes sense.
I tried used the exact same config and ran the playbook.
It still doesn't seem to recognize the script.
I'm also noticing the following error now:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: startswith first arg must be str or a tuple of str, not NoneType- Matt_MabisOct 26, 2022
Employee
Sorry for the delay when i got back from Ansiblefest had family things come up.
The error indicates that something in the code failed and returned either NONE or NULL type value and thats why u see the error.
If you want we could try and do a zoom to take a look at your setup and see if we can resolve where the issue is. ill PM you my Info!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
