Distribution Ubuntu 18.04 on host should use.....?

Well, well…

Been working on a new project the last couple of months and performed my last deploy last week totally fine.

Then today I get this error:

The following modules failed to execute: setup fatal: [staging.project.build]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"setup": {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "deprecations": [{"msg": "**Distribution Ubuntu 18.04 on host staging.project.build should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release will default to using the discovered platform python for this host.** See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information", "version": "2.12"}], "exception": "Traceback (most recent call last):\n File \"<stdin>\", line 102, in <module>\n File \"<stdin>\", line 87, in _ansiballz_main\n File \"/usr/lib/python2.7/tempfile.py\", line 331, in mkdtemp\n dir = gettempdir()\n File \"/usr/lib/python2.7/tempfile.py\", line 275, in gettempdir\n tempdir = _get_default_tempdir()\n File \"/usr/lib/python2.7/tempfile.py\", line 217, in _get_default_tempdir\n (\"No usable temporary directory found in %s\" % dirlist))\nIOError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/home/web']\n", "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"<stdin>\", line 102, in <module>\n File \"<stdin>\", line 87, in _ansiballz_main\n File \"/usr/lib/python2.7/tempfile.py\", line 331, in mkdtemp\n dir = gettempdir()\n File \"/usr/lib/python2.7/tempfile.py\", line 275, in gettempdir\n tempdir = _get_default_tempdir()\n File \"/usr/lib/python2.7/tempfile.py\", line 217, in _get_default_tempdir\n (\"No usable temporary directory found in %s\" % dirlist))\nIOError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/home/web']\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}}}

I’m not quite sure what this means but I am hoping someone does.

Furthermore, I decided to spool up a new DO droplet with Ubuntu 20.04 and attempt to provision and now I get this weird error:

Ansible on OS X requires python passlib module to create user password hashes

sudo easy_install pip
pip install passlib
fatal: [staging.project.com]: FAILED! => {"changed": false}

Hi, I am still trying to determine the cause of this and why it happened suddenly. I haven’t made any changes to any files myself since last week that would prevent my deployments, but here I am, dealing with this. Any ideas are greatly appreciated.

Here is the verbose output:

The following modules failed to execute: setup
fatal: [staging.project.com]: FAILED! => {
    "ansible_facts": {},
    "changed": false,
    "failed_modules": {
        "setup": {
            "ansible_facts": {
                "discovered_interpreter_python": "/usr/bin/python"
            },
            "deprecations": [
                {
                    "msg": "Distribution Ubuntu 18.04 on host staging.project.com should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release will default to using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information",
                    "version": "2.12"
                }
            ],
            "exception": "Traceback (most recent call last):\n  File \"<stdin>\", line 102, in <module>\n  File \"<stdin>\", line 87, in _ansiballz_main\n  File \"/usr/lib/python2.7/tempfile.py\", line 331, in mkdtemp\n    dir = gettempdir()\n  File \"/usr/lib/python2.7/tempfile.py\", line 275, in gettempdir\n    tempdir = _get_default_tempdir()\n  File \"/usr/lib/python2.7/tempfile.py\", line 217, in _get_default_tempdir\n    (\"No usable temporary directory found in %s\" % dirlist))\nIOError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/home/web']\n",
            "failed": true,
            "module_stderr": "Traceback (most recent call last):\n  File \"<stdin>\", line 102, in <module>\n  File \"<stdin>\", line 87, in _ansiballz_main\n  File \"/usr/lib/python2.7/tempfile.py\", line 331, in mkdtemp\n    dir = gettempdir()\n  File \"/usr/lib/python2.7/tempfile.py\", line 275, in gettempdir\n    tempdir = _get_default_tempdir()\n  File \"/usr/lib/python2.7/tempfile.py\", line 217, in _get_default_tempdir\n    (\"No usable temporary directory found in %s\" % dirlist))\nIOError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/home/web']\n",
            "module_stdout": "",
            "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
            "rc": 1
        }
    }
}

This topic was automatically closed after 42 days. New replies are no longer allowed.