Frzk / ansible-role-chrony

Ansible role to manage chrony.
Apache License 2.0
14 stars 8 forks source link

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

Open Frzk opened 1 year ago

Frzk commented 1 year ago

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 https://github.com/ansible-community/molecule/issues/3818

Frzk commented 1 year ago

Setting:

doesn't change anything.