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

(Molecule) Fails to create Ansible's temporary directory #13

Open
Frzk opened this issue May 31, 2023 · 1 comment
Open

(Molecule) Fails to create Ansible's temporary directory #13

Frzk opened this issue May 31, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Frzk
Copy link
Owner

Frzk commented May 31, 2023

The molecule converge calls Ansible, which fails to gather facts because it couldn't create temporary directory.
The root cause seems more to be that the instance is unreachable.

The error message is:

PLAY [Converge] ****************************************************************
  
  TASK [Gathering Facts] *********************************************************
  fatal: [instance]: UNREACHABLE! => changed=false 
    msg: 'Failed to create temporary directory. In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in "/tmp", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p "` echo /tmp `"&& mkdir "` echo /tmp/ansible-tmp-1685568278.5878556-2111-47362399749280 `" && echo ansible-tmp-1685568278.5878556-2111-47362399749280="` echo /tmp/ansible-tmp-1685568278.5878556-2111-47362399749280 `" ), exited with result 1'
    unreachable: true

The provisioner is configured like this:

provisioner:
  name: ansible
  env:
    ANSIBLE_LOCAL_TEMP: "${WORKSPACE:-$HOME}/.ansible/tmp"
    ANSIBLE_REMOTE_TMP: /tmp

Seems related to ansible/molecule#3818

@Frzk Frzk added the bug Something isn't working label May 31, 2023
@Frzk
Copy link
Owner Author

Frzk commented May 31, 2023

Setting:

  • privileged to True
  • pre_built_image to True
  • env: container: docker

doesn't change anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant