Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnupg task installation fails on Ubuntu 20.04.x unless update_cache: true #407

Open
abalage opened this issue Mar 7, 2023 · 8 comments
Open

Comments

@abalage
Copy link

abalage commented Mar 7, 2023

Hi,

Installing the role on stock Ubuntu 20.04 fails because of outdated package cache.
Explicitly asking for cache update in task "Ensure dependencies are installed." solves the problem.

I have found older issues mentioning this before.
#286
#398

Providing a single line change to fix it.

ps.: Thanks Jeff for your awesome work.

@abalage
Copy link
Author

abalage commented Mar 7, 2023

For the sake of completeness here are the before-after logs.

before

TASK [Install package dependencies (Debian family)] ***************************************************************************************************************************************************************
kedd 07 március 2023  20:25:17 +0100 (0:00:00.025)       0:00:12.251 **********                                                                                                                                    
kedd 07 március 2023  20:25:17 +0100 (0:00:00.025)       0:00:12.251 **********
fatal: [foo2.bar]: FAILED! => {"cache_update_time": 1672743859, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--
force-confold\"       install 'gnupg=2.2.19-3ubuntu2.2'' failed: E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/libk/libksba/libksba8_1.3.5-2ubuntu0.20.04.1_amd64.deb  404  Not Found [IP: 45.67.1
59.244 80]\nE: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/h/heimdal/libroken18-heimdal_7.7.0+dfsg-1ubuntu1.2_amd64.deb  404  Not Found [IP: 45.67.159.244 80]\nE: Failed to fetch http://security.
ubuntu.com/ubuntu/pool/main/h/heimdal/libasn1-8-heimdal_7.7.0+dfsg-1ubuntu1.2_amd64.deb  404  Not Found [IP: 45.67.159.244 80]\nE: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/h/heimdal/libheimbas
e1-heimdal_7.7.0+dfsg-1ubuntu1.2_amd64.deb  404  Not Found [IP: 45.67.159.244 80]\nE: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/h/heimdal/libhcrypto4-heimdal_7.7.0+dfsg-1ubuntu1.2_amd64.deb  40
4  Not Found [IP: 45.67.159.244 80]\nE: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/h/heimdal/libwind0-heimdal_7.7.0+dfsg-1ubuntu1.2_amd64.deb  404  Not Found [IP: 45.67.159.244 80]\nE: Failed to
 fetch http://security.ubuntu.com/ubuntu/pool/main/h/heimdal/libhx509-5-heimdal_7.7.0+dfsg-1ubuntu1.2_amd64.deb  404  Not Found [IP: 45.67.159.244 80]\nE: Failed to fetch http://security.ubuntu.com/ubuntu/pool/m
ain/h/heimdal/libkrb5-26-heimdal_7.7.0+dfsg-1ubuntu1.2_amd64.deb  404  Not Found [IP: 45.67.159.244 80]\nE: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/h/heimdal/libheimntlm0-heimdal_7.7.0+dfsg-1
ubuntu1.2_amd64.deb  404  Not Found [IP: 45.67.159.244 80]\nE: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/h/heimdal/libgssapi3-heimdal_7.7.0+dfsg-1ubuntu1.2_amd64.deb  404  Not Found [IP: 45.67.
159.244 80]\nE: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?\n", "rc": 100, "stderr": "E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/libk/libksba/libksba8_1
.3.5-2ubuntu0.20.04.1_amd64.deb  404  Not Found [IP: 45.67.159.244 80]\nE: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/h/heimdal/libroken18-heimdal_7.7.0+dfsg-1ubuntu1.2_amd64.deb  404  Not Found
 [IP: 45.67.159.244 80]\nE: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/h/heimdal/libasn1-8-heimdal_7.7.0+dfsg-1ubuntu1.2_amd64.deb  404  Not Found [IP: 45.67.159.244 80]\nE: Failed to fetch http
://security.ubuntu.com/ubuntu/pool/main/h/heimdal/libheimbase1-heimdal_7.7.0+dfsg-1ubuntu1.2_amd64.deb  404  Not Found [IP: 45.67.159.244 80]\nE: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/h/hei
mdal/libhcrypto4-heimdal_7.7.0+dfsg-1ubuntu1.2_amd64.deb  404  Not Found [IP: 45.67.159.244 80]\nE: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/h/heimdal/libwind0-heimdal_7.7.0+dfsg-1ubuntu1.2_am
d64.deb  404  Not Found [IP: 45.67.159.244 80]\nE: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/h/heimdal/libhx509-5-heimdal_7.7.0+dfsg-1ubuntu1.2_amd64.deb  404  Not Found [IP: 45.67.159.244 80]\
nE: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/h/heimdal/libkrb5-26-heimdal_7.7.0+dfsg-1ubuntu1.2_amd64.deb  404  Not Found [IP: 45.67.159.244 80]\nE: Failed to fetch http://security.ubuntu.com/
ubuntu/pool/main/h/heimdal/libheimntlm0-heimdal_7.7.0+dfsg-1ubuntu1.2_amd64.deb  404  Not Found
...

after

TASK [geerlingguy.docker : Ensure additional dependencies are installed (on Ubuntu >= 20.04).] ********************************************************************************************************************
kedd 07 március 2023  20:22:34 +0100 (0:00:00.028)       0:00:05.383 ********** 
kedd 07 március 2023  20:22:34 +0100 (0:00:00.028)       0:00:05.383 ********** 
changed: [foo1.bar]
changed: [foo2.bar] 

@stale
Copy link

stale bot commented Jun 18, 2023

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Jun 18, 2023
@abalage
Copy link
Author

abalage commented Jun 19, 2023

Not stale. Fix is provided, does not break anything but fixes reported issues.

@stale
Copy link

stale bot commented Jun 19, 2023

This issue is no longer marked for closure.

@stale stale bot removed the stale label Jun 19, 2023
@Tovervlag
Copy link

I got this too sadly. Following the ansible for kubernetes book.

@abalage
Copy link
Author

abalage commented Jul 26, 2023

As a workaround use the following task maybe as pre_tasks in your main playbook where you would normally invoke this role.

- name: Update package cache.
  ansible.builtin.apt:
    update_cache: true

Copy link

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@hungrymonkey
Copy link

hungrymonkey commented Jan 22, 2024

I apologize. wrong issue page

@github-actions github-actions bot removed the stale label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants