??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó
ßUdac @` s
d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d d
l Z d d
l
Z
d d
l Z d
Z
y d d
l Z e Z Wn# e k
r± e j ƒ Z
e Z n Xd d l m Z m Z d d l m Z m Z d
„ Z d „ Z e d k re ƒ n d
S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys=
---
module: expect
version_added: '2.0'
short_description: Executes a command and responds to prompts.
description:
- The C(expect) module executes a command and responds to prompts.
- The given command will be executed on all selected nodes. It will not be
processed through the shell, so variables like C($HOME) and operations
like C("<"), C(">"), C("|"), and C("&") will not work.
options:
command:
description:
- The command module takes command to run.
required: true
creates:
type: path
description:
- A filename, when it already exists, this step will B(not) be run.
removes:
type: path
description:
- A filename, when it does not exist, this step will B(not) be run.
chdir:
type: path
description:
- Change into this directory before running the command.
responses:
type: dict
description:
- Mapping of expected string/regex and string to respond with. If the
response is a list, successive matches return successive
responses. List functionality is new in 2.1.
required: true
timeout:
type: int
description:
- Amount of time in seconds to wait for the expected strings. Use
C(null) to disable timeout.
default: 30
echo:
description:
- Whether or not to echo out your response strings.
default: false
type: bool
requirements:
- python >= 2.6
- pexpect >= 3.3
notes:
- If you want to run a command through the shell (say you are using C(<),
C(>), C(|), etc), you must specify a shell in the command such as
C(/bin/bash -c "/path/to/something | grep else").
- The question, or key, under I(responses) is a python regex match. Case
insensitive searches are indicated with a prefix of C(?i).
- By default, if a question is encountered multiple times, its string
response will be repeated. If you need different responses for successive
question matches, instead of a string response, use a list of strings as
the response. The list functionality is new in 2.1.
- The M(expect) module is designed for simple scenarios. For more complex
needs, consider the use of expect code with the M(shell) or M(script)
modules. (An example is part of the M(shell) module documentation)
seealso:
- module: script
- module: shell
author: "Matt Martz (@sivel)"
s”
- name: Case insensitive password string match
expect:
command: passwd username
responses:
(?i)password: "MySekretPa$$word"
# you don't want to show passwords in your logs
no_log: true
- name: Generic question with multiple different responses
expect:
command: /path/to/custom/command
responses:
Question:
- response1
- response2
- response3
N( t
AnsibleModulet missing_required_lib( t to_nativet to_textc ` s) d „ | Dƒ ‰ ‡ ‡ ‡ f d † } | S( Nc s` s( | ] } d t | ƒ j d ƒ Vq d S( u %s
u
N( R t rstrip( t .0t r( ( sC /usr/lib/python2.7/site-packages/ansible/modules/commands/expect.pys w s c ` sH y t ˆ ƒ SWn3 t k
rC ˆ j d d ˆ | d d f ƒ n Xd S( Nt msgs0 No remaining responses for '%s', output was '%s't child_result_listiÿÿÿÿ( t nextt
StopIterationt fail_json( t info( t modulet questiont resp_gen( sC /usr/lib/python2.7/site-packages/ansible/modules/commands/expect.pyt wrappedy s
( ( R R t responsesR ( ( R R R sC /usr/lib/python2.7/site-packages/ansible/modules/commands/expect.pyt response_closurev s c C` s= t d t d t d t ƒ d t d d ƒ d t d d ƒ d t d d ƒ d t d d
d t ƒ d t d d d
d ƒ d t d d d
t ƒ ƒ ƒ } t s² | j d t d ƒ d t ƒ n | j d } | j d } | j d } | j d } | j d } | j d } | j d } t ƒ } xg | j ƒ D]Y \ } }
t
|
t ƒ rSt | | |
ƒ } n d t
|
ƒ j d ƒ } | | t
| ƒ