Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Comments

[RFC] Add pgp_keyring action plugin to install PGP keys#86360

Closed
eaaltonen wants to merge 1 commit intoansible:develfrom
eaaltonen:pgp_keyring
Closed

[RFC] Add pgp_keyring action plugin to install PGP keys#86360
eaaltonen wants to merge 1 commit intoansible:develfrom
eaaltonen:pgp_keyring

Conversation

@eaaltonen
Copy link

SUMMARY

Add action plugin to install PGP keys. First use case is to convert a PGP keyring to binary format before installing on destination host.

I was not comfortably configuring third party repositories. Packages like google-chrome and code install their PGP key in binary format - but I want to use ASCII armored format in version control for easier auditing.

This action plugin can handle the conversion, and be expanded to handle other use cases, such as to install the keyring to the correct location for the target OS.

RFC because PGPy apparently is not currently compatible with Python version 3.13 standard library (see https://pypi.org/project/PGPy13/ )

Comments very much welcome.

ISSUE TYPE
  • Feature Pull Request

Add action plugin to install PGP keys. First use case is to convert a
PGP keyring to binary format before installing on destination host.
@ansibot ansibot added feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. module This issue/PR relates to a module. labels Dec 20, 2025
@ansibot
Copy link
Contributor

ansibot commented Dec 20, 2025

The test ansible-test sanity --test pep8 [explain] failed with 4 errors:

lib/ansible/plugins/action/pgp_keyring.py:37:1: E101: indentation contains mixed spaces and tabs
lib/ansible/plugins/action/pgp_keyring.py:37:1: W191: indentation contains tabs
lib/ansible/plugins/action/pgp_keyring.py:37:3: E116: unexpected indentation (comment)
lib/ansible/plugins/action/pgp_keyring.py:38:1: E101: indentation contains mixed spaces and tabs

The test ansible-test sanity --test pylint [explain] failed with 6 errors:

lib/ansible/plugins/action/pgp_keyring.py:16:0: unused-import: Unused AnsibleAction imported from ansible.errors
lib/ansible/plugins/action/pgp_keyring.py:20:0: ansible-bad-import-from: Import string_types from the Python standard library equivalent instead of ansible.module_utils.six
lib/ansible/plugins/action/pgp_keyring.py:20:0: unused-import: Unused string_types imported from ansible.module_utils.six
lib/ansible/plugins/action/pgp_keyring.py:66:16: unreachable: Unreachable code
lib/ansible/plugins/action/pgp_keyring.py:66:47: undefined-variable: Undefined variable 'result'
lib/ansible/plugins/action/pgp_keyring.py:69:21: disallowed-name: Disallowed name "_"

The test ansible-test sanity --test ansible-requirements [explain] failed with 1 error:

test/lib/ansible_test/_data/requirements/ansible.txt:0:0: must be identical to requirements.txt

The test ansible-test sanity --test import --python 3.12 [explain] failed with 1 error:

lib/ansible/plugins/action/pgp_keyring.py:11:0: traceback: ModuleNotFoundError: No module named 'pgpy'

The test ansible-test sanity --test import --python 3.13 [explain] failed with 1 error:

lib/ansible/plugins/action/pgp_keyring.py:11:0: traceback: ModuleNotFoundError: No module named 'pgpy'

The test ansible-test sanity --test import --python 3.14 [explain] failed with 1 error:

lib/ansible/plugins/action/pgp_keyring.py:11:0: traceback: ModuleNotFoundError: No module named 'pgpy'

The test ansible-test sanity --test integration-aliases [explain] failed with 1 error:

test/integration/targets/pgp_keyring/aliases:0:0: missing alias `shippable/posix/group[1-5]` or `unsupported`

The test ansible-test sanity --test mypy [explain] failed with 1 error:

lib/ansible/plugins/action/pgp_keyring.py:11:1: import-not-found: Cannot find implementation or library stub for module named "pgpy"

click here for bot help

@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Dec 20, 2025
@Akasurde
Copy link
Member

@eaaltonen Thanks for the PR. We are not currently accepting any new plugins in Ansible core repository. You may want to raise this request against collection community.general.

Thanks,

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Dec 29, 2025
@mattclay mattclay closed this Jan 8, 2026
@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Jan 8, 2026
@ansible ansible locked and limited conversation to collaborators Feb 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants