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

Execution failed: No package matching 'gnupg' is available #56

Open
philippwaller opened this issue Jan 4, 2022 · 2 comments
Open

Execution failed: No package matching 'gnupg' is available #56

philippwaller opened this issue Jan 4, 2022 · 2 comments

Comments

@philippwaller
Copy link
Contributor

philippwaller commented Jan 4, 2022

Hey @robertdebock,

happy new year! I have come across an issue that can be fixed in several ways. I wanted to get your opinion before I create a pull request.

Describe the bug

When I run the role against the official Debian 11 cloud image, I get the following error message:

TASK [robertdebock.bootstrap : install bootstrap packages (package)] *************************************************************************************************************************************
ok: [10.10.0.119] => (item=python3)
ok: [10.10.0.119] => (item=sudo)
failed: [10.10.0.119] (item=gnupg) => changed=false 
  ansible_loop_var: item
  item: gnupg
  msg: No package matching 'gnupg' is available
ok: [10.10.0.119] => (item=python3-apt)

The execution fails because the image is delivered without package cache. If I manually preheat the cache (apt-get update) , everything goes well. According to the tasks/main.yaml file, the cache warm up is intended in the install bootstrap packages (raw) step. But in my case, the step is not executed since the test connection went successful.

I didn't get if the install bootstrap packages (package) task is supposed to act as a safety net and only checks if the raw step has been executed or if it is also supposed to install packages. If the latter, I would create a PR add an OS specific "update cache" task.

Can you please help shed some light on this?

@robertdebock
Copy link
Owner

That's a good catch. I indeed thought pre-heating was only required when packages are installed using "raw", but you are correct, pre-heating may be required for machines that do have python installed already.

Go ahead and make a PR please!

Thanks and happy new year to you too @philippwaller!

@philippwaller
Copy link
Contributor Author

philippwaller commented Jan 4, 2022

@robertdebock, thanks for clarification. I am almost done with the PR. However, now I have a completely different question:

Does it make sense to distinguish between systems with and without Python when exactly the same packages are installed? If we would always run the raw task, we could reduce the complexity and get the same result. Or did I miss anything?

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

2 participants