This paper mainly introduces several command modules of ansible, including:
command-Execute commands on the remote node
shell-Let the remote host execute the command under the shell process
script-Executes the local script after it
There are many methods to complete telnet batch processing. Here we can use a TCL/CT script. Next we will introduce this process. This is a simple TCL/terminal CT script to complete telnet to a remote device. Through this example, we can see that it
A detailed description of Linux expect usageI. OverviewThrough the shell we can achieve simple control flow functions, such as: cycle, judgment and so on. But for situations where interaction needs to be done manually, we may sometimes need to
Expect:is based onTcla relatively simple language for a free scripting toolused to implement automated and interactive task programs for communication without manual intervention. For example:ssh ftp , and so on, these programs normally need to
Small Q: patriotism means that you are a national of this country, and for this country, it should be compared to otherAll countries have deeper feelings. --George Bernard Shaw=======================================================================A:
Expect is a software tool for automated control and testing in UNIX systems, made by Don Libes, as an extension of the TCL scripting language, applied in interactive software such as TELNET,FTP,PASSWD,FSCK,RLOGIN,TIP,SSH, etc.Yum Install-y
1 overviewExpect, developed by Don Libes based on the TCL (Tool Command Language) language, is mainly used for automating interactive operation scenarios, using expect to process interactive commands, such as SSH logins, FTP logins, and so on in a
Original address: http://www.nginx.cn/1934.htmlWhere the shell script needs to interact with the here document is the implementation, but some commands require the user to manually go on the interaction such as passwd, SCPIt is very painful to
Using expect to implement automatic interaction of shell scripts
It is very effective for complex interactions and even different processing with different screen output.
And the General Linux, Unix have. It's very easy to use and powerful.
Spawn
[TOC]Distribution System-expect What is a distribution system?
Now some of the larger enterprises, most of the use of load balancing, and sometimes because some programs to change, or some bug to modify, if only a few servers, it is very
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.