Skip to content

Conversation

@tziuhtli
Copy link

@tziuhtli tziuhtli commented Jul 11, 2025

Either the gpg or the apt-key package is required for the ansible.builtin.apt_repository module. Neither of them are present in debian cloud images and must be installed manually. See for example https://cloud.debian.org/images/cloud the generic or genericcloud images.

Added gpg to the dependencies task.

tziuhtli added 2 commits July 12, 2025 01:39
The gpg package is not present in debian cloud images and must be installed manually e.g. in https://cloud.debian.org/images/cloud the `generic` or `genericcloud` images.
Reordered tasks so that gpg is installed before apt_repository is called.
@tziuhtli
Copy link
Author

tziuhtli commented Jul 12, 2025

Also reordered tasks so installation of requirements runs before ansible.builtin.apt_repository is called.

This role assumes that apt has its repositories up-to-date. This is not the case in a brand new install of a Debian cloud image VM, where the gpg package is not even in there! We could add update_cache: true to the "Ensure dependencies are installed" task. But it slows down the whole role a little bit. And perhaps it is better to run a separate update/upgrade playbook. On the other hand, without the cache up to date, the role still fails. Anyway, if you merge this, you might consider adding the cache update. :) In any case, thanks!

@HamzaKhait
Copy link

Hello,

Any news on this PR ? the patch works perfectly. Thanks

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

Successfully merging this pull request may close these issues.

2 participants