我已经为ansible-xml模块编写了一个任务。
- name: Learning xml module
xml:
file: /var/lib/tomcat7/webapps/sme/WEB-INF/sme-servlet.xml
xpath: //ref/[@abcd="test"]
我收到以下错误:
failed: [xxxx] => {"failed": true, "parsed": false}
BECOME-SUCCESS-ezlukfdsowbhzcovltxcovwmgbziywxu
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 3: Applying options for *
debug1: auto-mux: Trying existing master
debug1: mux_client_request_session: master session id: 2
Shared connection to xxxx closed.
答案 0 :(得分:1)
默认情况下,ansible会添加一些覆盖ssh_config
选项的选项。具体来说,它补充说:
-o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/user/.ansible/cp/ansible-ssh-%h-%p-%r"
将-vvv
与ansible-playbook
一起使用。
您可以通过在指定here的ssh_args
的{{1}}部分中指定[ssh_connection]
来覆盖这些选项。更改.ansible.cfg
实际上并未更改所有参数,因为Ansible还会传递ssh_args
和其他选项(例如-C -tt -v -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o ConnectTimeout=10
),其中一些只是不可变的默认值,其中一些取决于您在剧本中指定的变量。