Skip to content

Unable to find identity file in home directory of user running Ansible #334

Description

@knightsg

I'm running the latest master (commit #232aaf5c) and getting the following error when a playbook is run from our Jenkins agent server, as the Jenkins user:

[pid 3613] 21:59:06.117798 D mitogen: mitogen.ssh.Stream(u'local.3681').connect(): child process stdin/stdout=64
[pid 3613] 21:59:06.120488 D mitogen: mitogen.ssh.Stream(u'local.3681'): received 'Warning: Identity file ~/.ssh/XXXXXXXX.pem not accessible: No such file or directory.\n'
[pid 3613] 21:59:06.215677 D mitogen: mitogen.ssh.Stream(u'local.3681'): received 'Permission denied (publickey).\r\n'
[pid 3613] 21:59:06.216505 D mitogen: mitogen.ssh.Stream(u'local.3681'): child process still alive, sending SIGTERM
[pid 3678] 21:59:06.218670 D mitogen: Broker(0x7fb58094add0).shutdown()
[pid 3678] 21:59:06.219146 D mitogen: mitogen.core.Stream(u'unix_listener.3613').on_disconnect()
[pid 3678] 21:59:06.219847 D mitogen: Context(0, None).on_disconnect()
[pid 3613] 21:59:06.220063 D mitogen: mitogen.core.Stream(u'unix_client.3678').on_disconnect()
[pid 3613] 21:59:06.220703 D mitogen: Context(1003, None).on_disconnect()
[pid 3678] 21:59:06.221500 D mitogen: Waker(Broker(0x7fb58094add0) rfd=14, wfd=15).on_shutdown()
[pid 3678] 21:59:06.222075 D mitogen: Waker(Broker(0x7fb58094add0) rfd=14, wfd=15).on_disconnect()

fatal: [172.25.0.36]: UNREACHABLE! => {
    "changed": false,
    "msg": "SSH authentication is incorrect",
    "unreachable": true
}

When this is run without mitogen it works fine, for some reason it can't find the ssh key file in the jenkins user's home folder (or it can't find the home folder at all).

Controller
Uname: Linux XXXXXXXXXX 3.13.0-153-generic #203-Ubuntu SMP Thu Jun 14 08:52:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty

Ansible
ansible 2.4.6.0 (detached HEAD ref: refs/) last updated 2018/08/01 22:18:08 (GMT +000)
config file = /var/jenkins/.ansible.cfg
configured module search path = [u'/var/jenkins/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /opt/ansible/ansible-2.4/lib/ansible
executable location = /opt/ansible/ansible-2.4/bin/ansible
python version = 2.7.6 (default, Nov 23 2017, 15:49:48) [GCC 4.8.4]

Notes: Added 'strategy_plugins = /path/to/mitogen-master/ansible_mitogen/plugins/strategy' to defaults and ran ansible-playbook with 'ANSIBLE_STRATEGY=mitogen_linear' set.

Host(s)
Uname: Linux XXXXXXXXXXXX 3.13.0-153-generic #203-Ubuntu SMP Thu Jun 14 08:52:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
Python 2.7.6

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions