geerlingguy / ansible-role-nodejs

Ansible Role - Node.js

Home Page:https://galaxy.ansible.com/geerlingguy/nodejs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation broken on brandnew 20.04 Ubutuntu

neilyoung opened this issue · comments

Not even working with version 16.x or 18.x:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: apt_pkg.Error: E:Malformed entry 1 in list file /etc/apt/sources.list.d/deb_nodesource_com_node_16_x.list (URI), E:The list of sources could not be read.
failed: [mqtt] (item=deb https://deb.nodesource.com/node_16.x" focal main) => {"ansible_loop_var": "item", "changed": false, "item": "deb https://deb.nodesource.com/node_16.x\" focal main", "module_stderr": "Traceback (most recent call last):\n  File \"<stdin>\", line 107, in <module>\n  File \"<stdin>\", line 99, in _ansiballz_main\n  File \"<stdin>\", line 47, in invoke_module\n  File \"/usr/lib/python3.8/runpy.py\", line 207, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib/python3.8/runpy.py\", line 97, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/lib/python3.8/runpy.py\", line 87, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_apt_repository_payload_dx2bh_aj/ansible_apt_repository_payload.zip/ansible/modules/apt_repository.py\", line 765, in <module>\n  File \"/tmp/ansible_apt_repository_payload_dx2bh_aj/ansible_apt_repository_payload.zip/ansible/modules/apt_repository.py\", line 742, in main\n  File \"/usr/lib/python3/dist-packages/apt/cache.py\", line 170, in __init__\n    self.open(progress)\n  File \"/usr/lib/python3/dist-packages/apt/cache.py\", line 232, in open\n    self._cache = apt_pkg.Cache(progress)\napt_pkg.Error: E:Malformed entry 1 in list file /etc/apt/sources.list.d/deb_nodesource_com_node_16_x.list (URI), E:The list of sources could not be read.\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: apt_pkg.Error: E:Malformed entry 1 in list file /etc/apt/sources.list.d/deb_nodesource_com_node_16_x.list (URI), E:The list of sources could not be read.
failed: [mqtt] (item=deb-src https://deb.nodesource.com/node_16.x" focal main) => {"ansible_loop_var": "item", "changed": false, "item": "deb-src https://deb.nodesource.com/node_16.x\" focal main", "module_stderr": "Traceback (most recent call last):\n  File \"<stdin>\", line 107, in <module>\n  File \"<stdin>\", line 99, in _ansiballz_main\n  File \"<stdin>\", line 47, in invoke_module\n  File \"/usr/lib/python3.8/runpy.py\", line 207, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib/python3.8/runpy.py\", line 97, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/lib/python3.8/runpy.py\", line 87, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_apt_repository_payload__8f5r6sc/ansible_apt_repository_payload.zip/ansible/modules/apt_repository.py\", line 765, in <module>\n  File \"/tmp/ansible_apt_repository_payload__8f5r6sc/ansible_apt_repository_payload.zip/ansible/modules/apt_repository.py\", line 742, in main\n  File \"/usr/lib/python3/dist-packages/apt/cache.py\", line 170, in __init__\n    self.open(progress)\n  File \"/usr/lib/python3/dist-packages/apt/cache.py\", line 232, in open\n    self._cache = apt_pkg.Cache(progress)\napt_pkg.Error: E:Malformed entry 1 in list file /etc/apt/sources.list.d/deb_nodesource_com_node_16_x.list (URI), E:The list of sources could not be read.\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

Even with the latest plugin - geerlingguy.nodejs (7.0.0) was installed successfully and Node 18.x:

fatal: [mqtt]: FAILED! => {"changed": false, "msg": "Failed to update apt cache: W:Updating from such a repository can't be done securely, and is therefore disabled by default., W:See apt-secure(8) manpage for repository creation and user configuration details., E:The repository 'https://deb.nodesource.com/node_18.x\" nodistro Release' does not have a Release file."}

Same Problem here - is there a fix? 🤔

Same Problem here - is there a fix? 🤔

I dropped the plugin in favour of a shell installation