Skip to content

failed to transfer file to ~/.ansible/tmp/ansible-tmp-xxx/setup.py: [Errno 2] No such file or directory #21562

@avivian

Description

@avivian
ISSUE TYPE
  • Bug Report
COMPONENT NAME

ansible-playbook setup

ANSIBLE VERSION
ansible 2.2.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
CONFIGURATION
OS / ENVIRONMENT

Linux ip-x-x-x-x 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-1 (2016-03-06) x86_64 GNU/Linux

SUMMARY

When running ansible localhost using cloud-init, the following error is given:

PLAY [localhost] ***************************************************************

TASK [setup] *******************************************************************
fatal: [localhost]: FAILED! => {"failed": true, "msg": "failed to transfer file to ~/.ansible/tmp/ansible-tmp-1487178101.89-244463273612786/setup.py: [Errno 2] No such file or directory: '~/.ansible/tmp/ansible-tmp-1487178101.89-244463273612786/setup.py'"}
        to retry, use: --limit @/tmp/ansible/server/deploy_rancher_master.retry

PLAY RECAP *********************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=1

This works using version 2.2.0.0.

STEPS TO REPRODUCE

We run our playbooks on AWS as part of a cloud-init script used in a cloudformation template. The playbooks are downloaded on to the instance and run using:

ansible-playbook /tmp/ansible/server/deploy_rancher_master.yml --extra-vars "extra=vars"

Ansible is installed using apt:

apt-get -y -t jessie-backports install ansible

Sample cloudformation template can be provided if required.

EXPECTED RESULTS

Setup task to complete.

ACTUAL RESULTS
Error in setup task:
TASK [setup] *******************************************************************
fatal: [localhost]: FAILED! => {"failed": true, "msg": "failed to transfer file to ~/.ansible/tmp/ansible-tmp-1487178101.89-244463273612786/setup.py: [Errno 2] No such file or directory: '~/.ansible/tmp/ansible-tmp-1487178101.89-244463273612786/setup.py'"}
        to retry, use: --limit @/tmp/ansible/server/deploy_rancher_master.retry

This works using version 2.2.0.0

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