Failed to create temporary directory, but three days passed, it works, Why?

Question
Failed to create temporary directory, but three days passed, it works, Why?
Logs
TASK [Gathering Facts] *********************************************************
fatal: [xx.xx.xx.xx]: 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 ~/.ansible/tmp\”&& mkdir \“echo ~/.ansible/tmp/ansible-tmp-1735211329.977632-19-3329418728590\” && echo ansible-tmp-1735211329.977632-19-3329418728590=\“echo ~/.ansible/tmp/ansible-tmp-1735211329.977632-19-3329418728590\” ), exited with result 1”, “unreachable”: true}

---
- name: Change IP address on RHEL Linux
  hosts: "{{ myVM }}"
  become: yes

  vars:
    new_ip: xxxxx
    new_gateway: xxxxx
    new_dns: xxxxxx

  tasks:
    - name: Get IP Information
      command: ip a s
      register: ip_info
      ignore_errors: yes

    - name: Display IP Information
      debug:
        var: ip_info.stdout_lines

    - name: Change ip, gateway, dns
      shell: |
        CONNECTION_NAME=$(nmcli -t -f NAME connection show | head -n 1)
        nmcli connection modify "$CONNECTION_NAME" ipv4.addresses {{ new_ip }}/24
        nmcli connection modify "$CONNECTION_NAME" ipv4.gateway {{ new_gateway }}
        nmcli connection modify "$CONNECTION_NAME" ipv4.dns {{ new_dns }}
        nmcli connection up "$CONNECTION_NAME" &
      async: 45
      poll: 0

Disk was full? :upside_down_face:

Either that or there were some communication errors at the time.

1 Like

No, The available disk space is 21GB.
My AWX is build on docker and the version is 23.9.x, and maybe I should go back to check the logs that have communication errors or not. Thank you for your reply!

While free space is now 21GB and that’s quite plenty, it does not mean that it was not 0GB at the time :slight_smile:. Someone/something could have made some large temporary file and filled your disk. Monitoring is essential in catching these types of problems.

2 Likes