mesosphere-backup / ansible-dcos

[DEPRECATED] Please consider using the Ansible Roles for DC/OS maintained by the Mesosphere SRE team
https://github.com/dcos/dcos-ansible
Apache License 2.0
37 stars 31 forks source link

ssh: connect to host localhost port 22: Connection refused in plays/access-onprem.yml #22

Closed ghost closed 6 years ago

ghost commented 6 years ago

Minor problem

 ___________________________________
< TASK [Test Ansible user's access] >
 -----------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

fatal: [11.11.243.54 -> localhost]: FAILED! => 
{"changed": true, "cmd": "ssh centos@localhost 'sudo echo success'", 
"delta": "0:00:00.044245", "end": "2018-08-04 19:03:49.032553", 
"msg": "non-zero return code", "rc": 255, "start": "2018-08-04 19:03:48.988308", 
"stderr": "ssh: connect to host localhost port 22: Connection refused",
 "stderr_lines": ["ssh: connect to host localhost port 22: Connection refused"],
 "stdout": "", "stdout_lines": []}

When running plays/access-onprem.yml on Centos7 on Hetzner Cloud.

However note that the failure did not seem to affect the install as I did run ansible-playbook plays/install.yml just after and all is perfect

rembik commented 6 years ago

Because it is not best practice to execute the provisioning script from one of the cluster nodes (bootstrap inclusive). When you do it this way the test at the end of the access script will fail for localhost, because it try to connect from localhost over ssh to localhost... But it will work anyway, so consider this error as closed.