Skip to content

SSH auth failure in specific case #436

@trim777

Description

@trim777

I found similar issues, but due to different environment and steps to reproduce, I decided to create another issue.
I have the following code in role:

---

- name: add_msp_repos_url_undefined_consul | {{ item.key }} | Collect and set the msp-scm git hash commit
  delegate_to: 127.0.0.1
  become: no
  command: git rev-parse HEAD
  register: _git_version
  changed_when: false
  when:
    - deployment_mode != 'production'

- name: add_msp_repos_url_undefined_consul | {{ item.key }} | Register facts in Consul
  delegate_to: "{{ hostvars[groups.consul[0]].ansible_ssh_host }}"
  consul_kv:
    key: "{{ _consul_key.key }}/{{ item.key }}"
    value: "{{ _consul_key.value }}"
  loop_control:
    loop_var: _consul_key
  with_dict:
    msp_git_versions: "{{ _git_version.stdout | default('') }}"
    msp_versions: "{{ item.value.version }}"
    msp_builds: "{{ item.value.build if item.value.build else __max_build }}"

Many steps before this one and many roles running without errors. But at step "Register facts in Consul" I'm getting "SSH authentication "

This is output with -vvvv option:

log.txt

On ansible-controller and on targets running CentOS Linux release 7.5.1804 (Core), ansible and python are:

ansible-playbook 2.7.2
  config file = /root/msp-scm/ansible.cfg
  configured module search path = ['/root/msp-scm/library', '/root/msp-scm/submodules/kubespray/library']
  ansible python module location = /root/msp-scm/env/lib/python3.6/site-packages/ansible
  executable location = /root/msp-scm/env/bin/ansible-playbook
  python version = 3.6.6 (default, Aug 13 2018, 18:24:23) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]

Ansible-config dump is:

(env) [root@localhost msp-scm]# ansible-config dump --only-changed
ANSIBLE_PIPELINING(/root/msp-scm/ansible.cfg) = True
ANSIBLE_SSH_ARGS(/root/msp-scm/ansible.cfg) = -q -o "ControlMaster=auto" -o "ControlPersist=3600s"
ANSIBLE_SSH_CONTROL_PATH(/root/msp-scm/ansible.cfg) = %(directory)s/%%h-%%r
ANSIBLE_SSH_RETRIES(/root/msp-scm/ansible.cfg) = 5
CACHE_PLUGIN_TIMEOUT(/root/msp-scm/ansible.cfg) = 7200
DEFAULT_BECOME(/root/msp-scm/ansible.cfg) = True
DEFAULT_BECOME_METHOD(/root/msp-scm/ansible.cfg) = sudo
DEFAULT_BECOME_USER(/root/msp-scm/ansible.cfg) = root
DEFAULT_CALLBACK_PLUGIN_PATH(/root/msp-scm/ansible.cfg) = ['/root/msp-scm/plugins/callback']
DEFAULT_CALLBACK_WHITELIST(/root/msp-scm/ansible.cfg) = ['profile_tasks', 'eventlogging', 'sentry']
DEFAULT_FILTER_PLUGIN_PATH(/root/msp-scm/ansible.cfg) = ['/root/msp-scm/filter_plugins']
DEFAULT_FORKS(/root/msp-scm/ansible.cfg) = 10
DEFAULT_HASH_BEHAVIOUR(/root/msp-scm/ansible.cfg) = merge
DEFAULT_MANAGED_STR(/root/msp-scm/ansible.cfg) = Ansible managed
DEFAULT_MODULE_LANG(/root/msp-scm/ansible.cfg) = en_US.UTF-8
DEFAULT_MODULE_PATH(/root/msp-scm/ansible.cfg) = ['/root/msp-scm/library', '/root/msp-scm/submodules/kubespray/library']
DEFAULT_ROLES_PATH(/root/msp-scm/ansible.cfg) = ['/root/msp-scm/roles', '/root/msp-scm/playbooks/percona/roles', '/root/msp-scm/submodules/kubespray/roles']
DEFAULT_SCP_IF_SSH(/root/msp-scm/ansible.cfg) = True
DEFAULT_SFTP_BATCH_MODE(/root/msp-scm/ansible.cfg) = True
DEFAULT_STRATEGY(/root/msp-scm/ansible.cfg) = mitogen_linear
DEFAULT_STRATEGY_PLUGIN_PATH(/root/msp-scm/ansible.cfg) = ['/root/msp-scm/env/lib/python3.6/site-packages/ansible_mitogen/plugins/strategy']
DEFAULT_TIMEOUT(/root/msp-scm/ansible.cfg) = 30
DEPRECATION_WARNINGS(/root/msp-scm/ansible.cfg) = False
HOST_KEY_CHECKING(/root/msp-scm/ansible.cfg) = False
RETRY_FILES_ENABLED(/root/msp-scm/ansible.cfg) = False

Please, help with this issue, if it's possible.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions