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
apt_repository module requires gpg to be installed target, but docs don't mention #76133
Comments
Files identified in the description: If these files are incorrect, please update the |
the real dependency is apt-key, which itself requires gpg also note that apt-key is deprecated and we should look to using the new way of accepting repositories in debian |
I transformed my apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 to gpg --keyserver keyserver.ubuntu.com --recv 93C4A3FD7BB9C367 && \
gpg --export 93C4A3FD7BB9C367 > /usr/share/keyrings/ansible-archive-keyring.gpg thanks to this topic. Don't hesitate to suggest improvments :) |
@bcoca the docs fix here seems quite simple - add gpg to the requirements on the |
since then i've updated apt_repository to use gpg in case apt-key is not present so 'requirements: apt-key or gpg |
Documentation fix: Add a line above https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/apt_repository.py#L102
|
@bcoca As apt-key is deprecated, you should probably only use gpg and install it automatically if needed |
@tigerblue77 it is a fallback for now as people tend to keep things around much longer than they should and the module should work for them too. |
Sounds good, thanks @akamanzi !! |
Summary
The
apt_repository
will fail with a somewhat confusing error if gnugp, and dirmngr manager are not installed. Neither of these packages are Required/Essential/Important, and may not be already installed in minimal systems that you might want to runapt_repository
on.The fix might be to just include
gnupg
in the requirements section of the docs.Issue Type
Documentation Report
Component Name
apt_repository
Ansible Version
Configuration
$ ansible-config dump --only-changed
OS / Environment
Mostly a docs issue so this is N/A. But apt_repository applies to Debian, Ubuntu, and forks.
Additional Information
Tells people that need gnupg when using apt_repository.
Code of Conduct
The text was updated successfully, but these errors were encountered: