Forum Discussion
Running tmsh create from bash script
Hello,
Do any of you know how to run tmsh commands from shell scripts?
2 Replies
- Kevin_Davies_40
Nacreous
Its quite easy. There are two ways, line by line, as in yo execute tmsh directly each time.
tmsh save /sys config tmsh create /ltm virtual ....or create a text file with everything you need then just run
tmsh < filenameI often do the latter for deployments. If you want to select partitions just use cd /parition_name at the top of the file. Example
Example myfile.pools create /ltm pool mypool members { 1.1.1.1:80 1.1.1.2:80 1.1.1.3:80 } create /ltm pool mypool2 members { 1.1.1.1:80 1.1.1.2:80 1.1.1.3:80 }Command to deploy is then just
tmsh < myfile.pools - kminus_131987
Nimbostratus
You are the man dude. My issue was I had the commands in the script like this:
TMSH Create /ltm xxxxx
Instead of like this:
tmsh create/ltm xxxxxx
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