Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ansible无法连接到某些播放的主机_Ansible - Fatal编程技术网

Ansible无法连接到某些播放的主机

Ansible无法连接到某些播放的主机,ansible,Ansible,我有一个非常简单的游戏,我有很多问题,以获得正确的运行。在运行SSH时,我一直收到一个无法访问的错误。我在不同环境中的两台独立机器上(尽管是从相同的图像构建的)得到了这个结果,这是Debian9机器 重头戏就是简单地更新一个内部镜像服务器 - name: Update Mirror Servers hosts: all become: yes gather_facts: yes tasks: - name: Run Update shell: "sudo apt-

我有一个非常简单的游戏,我有很多问题,以获得正确的运行。在运行SSH时,我一直收到一个无法访问的错误。我在不同环境中的两台独立机器上(尽管是从相同的图像构建的)得到了这个结果,这是Debian9机器

重头戏就是简单地更新一个内部镜像服务器

- name: Update Mirror Servers
  hosts: all
  become: yes
  gather_facts: yes
  tasks:
  -  name: Run Update
     shell: "sudo apt-mirror"

  -  name: Change Permissions
     file:
       path: /var/apt-mirror
       state: directory
       recurse: yes
       mode: '0755'
这是从Ansible AWX运行的,以防有任何不同

错误如下

"unreachable": true,
    "msg": "Failed to connect to the host via ssh: OpenSSH_8.0p1, OpenSSL 1.1.1c FIPS  28 May 2019\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug3: /etc/ssh/ssh_config line 51: Including file /etc/ssh/ssh_config.d/05-redhat.conf depth 0\r\ndebug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf\r\ndebug2: checking match for 'final all' host x.x.x.x originally x.x.x.x\r\ndebug3: /etc/ssh/ssh_config.d/05-redhat.conf line 3: not matched 'final'\r\ndebug2: match not found\r\ndebug3: /etc/ssh/ssh_config.d/05-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only)\r\ndebug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config\r\ndebug3: gss kex names ok: [gss-gex-sha1-,gss-group14-sha1-]\r\ndebug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1]\r\ndebug1: configuration requests final Match pass\r\ndebug2: resolve_canonicalize: hostname x.x.x.x is address\r\ndebug1: re-parsing configuration\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug3: /etc/ssh/ssh_config line 51: Including file /etc/ssh/ssh_config.d/05-redhat.conf depth 0\r\ndebug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf\r\ndebug2: checking match for 'final all' host x.x.x.x originally x.x.x.x\r\ndebug3: /etc/ssh/ssh_config.d/05-redhat.conf line 3: matched 'final'\r\ndebug2: match found\r\ndebug3: /etc/ssh/ssh_config.d/05-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1\r\ndebug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config\r\ndebug3: gss kex names ok: [gss-gex-sha1-,gss-group14-sha1-]\r\ndebug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1]\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 10035\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Control master terminated unexpectedly\r\nShared connection to x.x.x.x closed.",
    "changed": false
我尝试将ansible_ssh_用户和ansible_ssh_pass作为变量添加到这些机器所在的组中。 我能够成功运行ping等

添加标识:/tmp/awx_187_x0lo965h/artifacts/187/ssh_key_数据

(/tmp/awx_187_x0lo965h/artifacts/187/ssh_key_data)
SSH password: 
BECOME password[defaults to SSH password]: 
redacted | SUCCESS => {
    "changed": false,
    "ping": "pong"
}
我确信这可能是我在配置中遗漏的一些小东西。有人能给我指出正确的方向吗

谢谢


Kam

你好……祝你好运!请通过链接嗨…WC到SO!请浏览链接