Closed pdacostaporto closed 5 years ago
My plays are failling when this role is trying to add the CRAN apt repository. The related error message shown by Ansible is:
TASK [oefenweb.r : repository | add cran-r] ************************************ task path: /etc/ansible/roles/oefenweb.r/tasks/repository.yml:11 <default> ESTABLISH LOCAL CONNECTION FOR USER: vagrant <default> EXEC /bin/sh -c 'echo ~vagrant && sleep 0' <default> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/vagrant/.ansible/tmp/ansible-tmp-1566962934.62-12908592978028 `" && echo ansible-tmp-1566962934.62-12908592978028="` echo /home/vagrant/.ansible/tmp/ansible-tmp-1566962934.62-12908592978028 `" ) && sleep 0' Using module file /usr/lib/python2.7/dist-packages/ansible/modules/packaging/os/apt_repository.py <default> PUT /home/vagrant/.ansible/tmp/ansible-local-19781b7Pbbg/tmpWCph8Z TO /home/vagrant/.ansible/tmp/ansible-tmp-1566962934.62-12908592978028/AnsiballZ_apt_repository.py <default> EXEC /bin/sh -c 'chmod u+x /home/vagrant/.ansible/tmp/ansible-tmp-1566962934.62-12908592978028/ /home/vagrant/.ansible/tmp/ansible-tmp-1566962934.62-12908592978028/AnsiballZ_apt_repository.py && sleep 0' <default> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-qgxrmqhgbsprunpruwjdudgellnyzfpx ; /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1566962934.62-12908592978028/AnsiballZ_apt_repository.py'"'"' && sleep 0' <default> EXEC /bin/sh -c 'rm -f -r /home/vagrant/.ansible/tmp/ansible-tmp-1566962934.62-12908592978028/ > /dev/null 2>&1 && sleep 0' The full traceback is: Traceback (most recent call last): File "/home/vagrant/.ansible/tmp/ansible-tmp-1566962934.62-12908592978028/AnsiballZ_apt_repository.py", line 114, in <module> _ansiballz_main() File "/home/vagrant/.ansible/tmp/ansible-tmp-1566962934.62-12908592978028/AnsiballZ_apt_repository.py", line 106, in _ansiballz_main invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) File "/home/vagrant/.ansible/tmp/ansible-tmp-1566962934.62-12908592978028/AnsiballZ_apt_repository.py", line 49, in invoke_module imp.load_module('__main__', mod, module, MOD_DESC) File "/tmp/ansible_apt_repository_payload_E7Qw0R/__main__.py", line 554, in <module> File "/tmp/ansible_apt_repository_payload_E7Qw0R/__main__.py", line 546, in main File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 559, in update raise FetchFailedException(e) apt.cache.FetchFailedException: W:GPG error: https://cran.rstudio.com/bin/linux/ubuntu bionic-cran35/ InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51716619E084DAB9, E:The repository 'https://cran.rstudio.com/bin/linux/ubuntu bionic-cran35/ InRelease' is not signed. failed: [default] (item={u'url': u'https://cran.rstudio.com/bin/linux/ubuntu bionic-cran35/', u'type': u'deb'}) => { "ansible_loop_var": "item", "changed": false, "item": { "type": "deb", "url": "https://cran.rstudio.com/bin/linux/ubuntu bionic-cran35/" }, "module_stderr": "Traceback (most recent call last):\n File \"/home/vagrant/.ansible/tmp/ansible-tmp-1566962934.62-12908592978028/AnsiballZ_apt_repository.py\", line 114, in <module>\n _ansiballz_main()\n File \"/home/vagrant/.ansible/tmp/ansible-tmp-1566962934.62-12908592978028/AnsiballZ_apt_repository.py\", line 106, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/vagrant/.ansible/tmp/ansible-tmp-1566962934.62-12908592978028/AnsiballZ_apt_repository.py\", line 49, in invoke_module\n imp.load_module('__main__', mod, module, MOD_DESC)\n File \"/tmp/ansible_apt_repository_payload_E7Qw0R/__main__.py\", line 554, in <module>\n File \"/tmp/ansible_apt_repository_payload_E7Qw0R/__main__.py\", line 546, in main\n File \"/usr/lib/python2.7/dist-packages/apt/cache.py\", line 559, in update\n raise FetchFailedException(e)\napt.cache.FetchFailedException: W:GPG error: https://cran.rstudio.com/bin/linux/ubuntu bionic-cran35/ InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51716619E084DAB9, E:The repository 'https://cran.rstudio.com/bin/linux/ubuntu bionic-cran35/ InRelease' is not signed.\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1 }
Looks like a problem with the signing key of the repository.
I'm using Ubuntu 18.04 LTS (Bionic Beaver).
Looks like the signing key was out of date. #40 fixes it for me.
My plays are failling when this role is trying to add the CRAN apt repository. The related error message shown by Ansible is:
Looks like a problem with the signing key of the repository.
I'm using Ubuntu 18.04 LTS (Bionic Beaver).