Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"msg": "SSH Error: data could not be sent to remote host.... Make sure this host can be reached over ssh" #1

Open
SuhanovDima opened this issue Jul 19, 2019 · 0 comments

Comments

@SuhanovDima
Copy link

SuhanovDima commented Jul 19, 2019

Changed hosts as

[pgsql]
cluster-pgsql-01.local ansible_ssh_host=10.98.0.210 ansible_ssh_user=root
cluster-pgsql-02.local ansible_ssh_host=10.98.0.211 ansible_ssh_user=root
cluster-pgsql-03.local ansible_ssh_host=10.98.0.212 ansible_ssh_user=root

[pgsql:vars]
patroni_scope=cluster-pgsql
patroni_rest_password=flsdjkfasdjhfsd
patroni_postgres_password=flsdjkfasdjhfsd
patroni_replicator_password=flsdjkfasdjhfsd

cluster_virtual_ip="10.98.0.210"

<spoiler title="/etc/ansible/host_vars/pgsql-cluster-01.local/main.yml">
<source lang="yaml">
patroni_node_name: cluster_pgsql_01
keepalived_priority: 99

I set up ssh key and set up authority for root without password on all servers. Removed "ssh.role" from cluster-pgsql.yml :

---
- hosts: pgsql

  pre_tasks:
    - name: Setting system hostname
      hostname: name="{{ ansible_host }}"

    - include: tasks/essentialsoftware.yml
    - include: tasks/open-vm-tools.yml
    - include: tasks/ntpd.yml

  post_tasks:
    - include: tasks/zabbix.yml

  roles:
     - ansible-role-patroni

When I run script "ansible-playbook -u root -k -i hosts cluster-pgsql.yml -b --diff -vvv"
I get error :

*cluster-pgsql-01.local | UNREACHABLE! => {
    "changed": false,
    "msg": "SSH Error: data could not be sent to remote host \"10.98.0.210\". Make sure this host can be reached over ssh",
    "unreachable": true
}
  • and for other hosts.

What did I make wrong ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant