Forum Discussion
kminus_131987
Nimbostratus
Jun 23, 2014Running tmsh create from bash script
Hello,
Do any of you know how to run tmsh commands from shell scripts?
Kevin_Davies_40
Nacreous
Jun 23, 2014Its 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 < filename
I 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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects