- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有 Ansible 的服务器。当我尝试在 Ansible 机器上从 shell 执行单个命令时 - 一切都很好。
示例:
omazilov@ansible:~$ ansible all -m ping
192.168.1.10 | success >> {
"changed": false,
"ping": "pong"
}
192.168.1.11 | success >> {
"changed": false,
"ping": "pong"
}
但是,当我尝试从本地计算机通过 SSH 运行命令时,出现错误。
omazilov@local:~$ ssh omazilov@ansible.local "ansible all -m ping -vvvv"
omazilov@ansible.local's password:
192.168.1.10 | FAILED => SSH encountered an unknown error. The output was:
OpenSSH_5.9p1 Debian-5ubuntu1.4, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: auto-mux: Trying existing master
debug1: Control socket "/home/omazilov/.ansible/cp/ansible-ssh-192.168.1.10-22-omazilov" does not exist
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.1.10 [192.168.1.10] port 22.
debug2: fd 3 setting O_NONBLOCK
debug1: fd 3 clearing O_NONBLOCK
debug1: Connection established.
debug3: timeout: 9932 ms remain after connect
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/omazilov/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /home/omazilov/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/omazilov/.ssh/id_rsa-cert type -1
debug1: identity file /home/omazilov/.ssh/id_dsa type -1
debug1: identity file /home/omazilov/.ssh/id_dsa-cert type -1
debug1: identity file /home/omazilov/.ssh/id_ecdsa type -1
debug1: identity file /home/omazilov/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9p1 Debian-5ubuntu1.1
debug1: match: OpenSSH_5.9p1 Debian-5ubuntu1.1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.4
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "192.168.1.10" from file "/home/omazilov/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /home/omazilov/.ssh/known_hosts:752
debug3: load_hostkeys: loaded 1 keys
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: zlib@openssh.com,zlib,none
debug2: kex_parse_kexinit: zlib@openssh.com,zlib,none
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 zlib@openssh.com
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 zlib@openssh.com
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 4f:ae:27:26:3d:8e:22:0d:e0:95:ca:0c:19:17:47:37
debug3: load_hostkeys: loading entries for host "192.168.1.10" from file "/home/omazilov/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /home/omazilov/.ssh/known_hosts:752
debug3: load_hostkeys: loaded 1 keys
debug1: Host '192.168.1.10' is known and matches the ECDSA host key.
debug1: Found key in /home/omazilov/.ssh/known_hosts:752
debug1: ssh_ecdsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/omazilov/.ssh/id_rsa (0x7f3d62750d70)
debug2: key: /home/omazilov/.ssh/id_dsa ((nil))
debug2: key: /home/omazilov/.ssh/id_ecdsa ((nil))
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password
debug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey
debug3: authmethod_lookup gssapi-with-mic
debug3: remaining preferred: gssapi-keyex,hostbased,publickey
debug3: authmethod_is_enabled gssapi-with-mic
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
Cannot determine realm for numeric host address
debug1: Unspecified GSS failure. Minor code may provide more information
Cannot determine realm for numeric host address
debug1: Unspecified GSS failure. Minor code may provide more information
debug1: Unspecified GSS failure. Minor code may provide more information
Cannot determine realm for numeric host address
debug2: we did not send a packet, disable method
debug3: authmethod_lookup gssapi-keyex
debug3: remaining preferred: hostbased,publickey
debug3: authmethod_is_enabled gssapi-keyex
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug2: we did not send a packet, disable method
debug3: authmethod_lookup publickey
debug3: remaining preferred: ,publickey
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/omazilov/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug2: input_userauth_pk_ok: fp c8:7b:ed:81:6d:83:d8:9b:55:7b:a7:3d:5c:53:a8:a5
debug3: sign_and_send_pubkey: RSA c8:7b:ed:81:6d:83:d8:9b:55:7b:a7:3d:5c:53:a8:a5
debug1: key_parse_private_pem: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
debug1: read_passphrase: can't open /dev/tty: No such device or address
debug2: no passphrase given, try next key
debug1: Trying private key: /home/omazilov/.ssh/id_dsa
debug3: no such identity: /home/omazilov/.ssh/id_dsa
debug1: Trying private key: /home/omazilov/.ssh/id_ecdsa
debug3: no such identity: /home/omazilov/.ssh/id_ecdsa
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
192.168.1.11 | FAILED => SSH encountered an unknown error. The output was:
OpenSSH_5.9p1 Debian-5ubuntu1.4, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: auto-mux: Trying existing master
debug1: Control socket "/home/omazilov/.ansible/cp/ansible-ssh-192.168.1.11-22-omazilov" does not exist
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.1.11 [192.168.1.11] port 22.
debug2: fd 3 setting O_NONBLOCK
debug1: fd 3 clearing O_NONBLOCK
debug1: Connection established.
debug3: timeout: 9932 ms remain after connect
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/omazilov/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /home/omazilov/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/omazilov/.ssh/id_rsa-cert type -1
debug1: identity file /home/omazilov/.ssh/id_dsa type -1
debug1: identity file /home/omazilov/.ssh/id_dsa-cert type -1
debug1: identity file /home/omazilov/.ssh/id_ecdsa type -1
debug1: identity file /home/omazilov/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9p1 Debian-5ubuntu1.1
debug1: match: OpenSSH_5.9p1 Debian-5ubuntu1.1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.4
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "192.168.1.11" from file "/home/omazilov/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /home/omazilov/.ssh/known_hosts:988
debug3: load_hostkeys: loaded 1 keys
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: zlib@openssh.com,zlib,none
debug2: kex_parse_kexinit: zlib@openssh.com,zlib,none
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 zlib@openssh.com
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 zlib@openssh.com
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 4f:ae:27:26:3d:8e:22:0d:e0:95:ca:0c:19:17:47:37
debug3: load_hostkeys: loading entries for host "192.168.1.10" from file "/home/omazilov/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /home/omazilov/.ssh/known_hosts:988
debug3: load_hostkeys: loaded 1 keys
debug1: Host '192.168.1.10"' is known and matches the ECDSA host key.
debug1: Found key in /home/omazilov/.ssh/known_hosts:988
debug1: ssh_ecdsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/omazilov/.ssh/id_rsa (0x7f6409faad70)
debug2: key: /home/omazilov/.ssh/id_dsa ((nil))
debug2: key: /home/omazilov/.ssh/id_ecdsa ((nil))
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password
debug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey
debug3: authmethod_lookup gssapi-with-mic
debug3: remaining preferred: gssapi-keyex,hostbased,publickey
debug3: authmethod_is_enabled gssapi-with-mic
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
Cannot determine realm for numeric host address
debug1: Unspecified GSS failure. Minor code may provide more information
Cannot determine realm for numeric host address
debug1: Unspecified GSS failure. Minor code may provide more information
debug1: Unspecified GSS failure. Minor code may provide more information
Cannot determine realm for numeric host address
debug2: we did not send a packet, disable method
debug3: authmethod_lookup gssapi-keyex
debug3: remaining preferred: hostbased,publickey
debug3: authmethod_is_enabled gssapi-keyex
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug2: we did not send a packet, disable method
debug3: authmethod_lookup publickey
debug3: remaining preferred: ,publickey
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/omazilov/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug2: input_userauth_pk_ok: fp c8:7b:ed:81:6d:83:d8:9b:55:7b:a7:3d:5c:53:a8:a5
debug3: sign_and_send_pubkey: RSA c8:7b:ed:81:6d:83:d8:9b:55:7b:a7:3d:5c:53:a8:a5
debug1: key_parse_private_pem: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
debug1: read_passphrase: can't open /dev/tty: No such device or address
debug2: no passphrase given, try next key
debug1: Trying private key: /home/omazilov/.ssh/id_dsa
debug3: no such identity: /home/omazilov/.ssh/id_dsa
debug1: Trying private key: /home/omazilov/.ssh/id_ecdsa
debug3: no such identity: /home/omazilov/.ssh/id_ecdsa
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
<192.168.1.10> ESTABLISH CONNECTION FOR USER: omazilov
<192.168.1.10> REMOTE_MODULE ping
<192.168.1.10> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/home/omazilov/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=22', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=10', '192.168.1.10', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1412166408.61-193292311991754 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1412166408.61-193292311991754 && echo $HOME/.ansible/tmp/ansible-tmp-1412166408.61-193292311991754'"]
<192.168.1.11> ESTABLISH CONNECTION FOR USER: omazilov
<192.168.1.11> REMOTE_MODULE ping
<192.168.1.11> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/home/omazilov/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=22', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=10', '192.168.1.11', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1412166408.61-7233830878884 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1412166408.61-7233830878884 && echo $HOME/.ansible/tmp/ansible-tmp-1412166408.61-7233830878884'"]
Ansible 配置:
[defaults]
hostfile = /etc/ansible/hosts
library = /usr/share/ansible
remote_tmp = $HOME/.ansible/tmp
pattern = *
forks = 5
poll_interval = 15
sudo_user = root
#ask_sudo_pass = True
#ask_pass = True
transport = smart
remote_port = 22
module_lang = C
gathering = implicit
sudo_exe = sudo
timeout = 10
action_plugins = /usr/share/ansible_plugins/action_plugins
callback_plugins = /usr/share/ansible_plugins/callback_plugins
connection_plugins = /usr/share/ansible_plugins/connection_plugins
lookup_plugins = /usr/share/ansible_plugins/lookup_plugins
vars_plugins = /usr/share/ansible_plugins/vars_plugins
filter_plugins = /usr/share/ansible_plugins/filter_plugins
[accelerate]
accelerate_port = 5099
accelerate_timeout = 30
accelerate_connect_timeout = 5.0
accelerate_daemon_timeout = 30
最佳答案
首先我没有看到在本地 ssh'ing 的用例(我假设 ansible.local 是 localhost)来运行 ansible 命令。这对我来说是个谜!
关于问题,由于您使用密码进行 ssh 连接,因此没有身份验证转发。因此 ansible 命令不能工作,除非:
~/.ssh/id_rsa.pub
添加到您的 ~/.ssh/authorized_keys
),并使用 ssh -A
转发认证-k
开关关于ssh - 通过 ssh 运行 Ansible 单个命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26141536/
尽管用户是 sudo 用户,但远程主机在运行 Ansible playbook 时仍会引发错误。 "/usr/bin/python: can't open file '/home/ludd/.ansi
只是想了解 ansible 和 ansible-galaxy 之间的核心区别是什么?从文档中,ansible-galaxy 用于管理角色(创建和发布)那么ansible是做什么用的呢?只运行剧本? 我
只是想了解 ansible 和 ansible-galaxy 之间的核心区别是什么?从文档中,ansible-galaxy 用于管理角色(创建和发布)那么ansible是做什么用的呢?只运行剧本? 我
我有一个定义如下的剧本: - name: install percona rpms hosts: imdp roles: - role1 - role2 - role3
Ansible 版本:2.4.2.0 来自 here和 here ,我可以写下面的剧本 $ cat test.yml - name: Finding Master VMs hosts: all-c
我正在运行这个 Ansible 剧本: - name: Set String set_fact: string: item loop: "{{some_var|filter()}}"
我无法在我的输出变量中搜索我用于 when 语句的指定字符串。下面的代码应该检查输出变量中的字符串“distribute-list”,但是在运行 playbook 时会出现错误。 fatal: [19
在 Ansible 中是否可以仅当处理程序出现在该播放中时才有条件地通知处理程序? 例如:我有一个多主机配置的剧本。有些主机使用 Apache 运行 PHP,有些使用 PHP-FPM。根据主机,修改
我是 ansible 的新手,正在学习 ansible 并致力于定义 ansible 脚本以在服务器上安装 confluent。在查看有关如何定义和运行 ansible 脚本的示例时,一些示例使用“a
是否可以列出Ansible角色中的任务? 即除了grepping - name以外,还有没有现成的方法可以做到这一点? 最佳答案 创建一个指定角色的简单剧本,并使用ansible-playbook选项
所以ansible-playbook有 --ask-pass和 --ask-sudo-pass .有没有办法让 ssh 先尝试没有密码,然后只有在无密码登录失败时才提示输入密码?同样,ansible
Ansible 提供了许多过滤器和条件。据我所知;应该可以实现一个 Ansible playbook 来执行一组任务,这些任务实现与图灵完备语言相同的结果。那么,图灵完备吗? 最佳答案 我觉得是这样的
我一直在寻找,但没有太多关于什么 Ansible 保险库密码文件应该是什么样的。 例如我想做: ANSIBLE_VAULT_PASSWORD_FILE=./pwdfile ansible-vault
我在运行完整的剧本时遇到了麻烦,因为后来的剧本所依赖的一些事实在早期的剧本中被修改了,但是 ansible 不会在运行中更新事实。 运行ansible somehost -m setup当整个剧本开始
我对Ansible很陌生 是否可以使用Ansible检查文件中是否存在字符串。 我要检查的是用户有权访问服务器。 这可以使用cat /etc/passwd | grep username在服务器上完成
我正在尝试使用 jinja2 通过 ansible 模板循环字典以创建多个数据源,但收到此错误 [{'msg': "AnsibleUndefinedVariable: One or more unde
我正在尝试将文件复制到/ etc。但是当我运行剧本时,我收到“msg:目标/ etc不可写”的消息。这是我的Playbook任务部分。非常感谢您的帮助。 任务: - name: copy rsyslo
我正面临这个恼人的错误:Ansible hosts are randomly unreachable #18188 . 有没有办法告诉 Ansible 如果 SSH 连接失败,再试一次?还是2倍? 根
我正在编写一个简单的任务来创建用户。作为此任务的一部分,我想从defaults / main.yml中读取密码。 默认值/ main.yml test_user:testuser test_group
当我在Ansible中使用lineinfile时,它不会写',"字符 lineinfile: 'dest=/home/xyz state=present line="CACHES="default""
我是一名优秀的程序员,十分优秀!