-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
add module pacman_key #778
add module pacman_key #778
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note that all new modules need to have tests. Since we do not have Arch Linux nodes in CI, unit tests are probably best in this case.
@felixfontein Thanks for the exceptional feedback! I'll implement your suggestions when I have the time. |
I'm not having any luck implementing unit tests due to this occurring.
The documentation simply states to run the tests in docker containers with |
See the documentation here: https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#contributing-to-collections |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grawlinson thanks for the new module!
To have unit or integration tests would be good
@grawlinson are you still working on this? needs_info |
Since the last few messages, I've got a new laptop so this hasn't been a pressing priority. I'll hop on IRC and ask a few questions in the next week or so. |
@grawlinson any updates on this? |
-label needs_triage |
Please note that community.general will be released next Tuesday. Would be great if we can get this PR merged for that :) |
a full length (40 characters) key ID is equivalent to the fingerprint.
I think module test coverage is at ~90% at the moment. Is there a threshold that new modules need? |
Not that I am aware @grawlinson . (Maybe we should, but to establish any threshold without adding test coverage to all modules (many are at 0% today) wouldn't feel right, IMO). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good to me! Thanks @grawlinson for your contribution! 😁
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something I missed before. Besides that, looks good!
Co-authored-by: Felix Fontein <felix@fontein.de>
Backport to stable-3: 💚 backport PR created✅ Backport PR branch: Backported as #2704 🤖 @patchback |
* add module pacman_key * add symlink and fix documentation for pacman_key * documentation fix for pacman_key * improve logic around user input * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Improve parameter checking required_one_of=[] is neat. Co-authored-by: Alexei Znamensky * Revert "Improve parameter checking" This reverts commit 044b0cb. * Simplify a bunch of code. * fix typos pointed out by yan12125 * replaced manual checks with required-if invocation * added default keyring to documentation * some initial tests * updated metadata * refactored to make sanity tests pass * refactor to make sanity tests pass ... part deux * refactor: simplify run_command invocations * test: cover check-mode and some normal operation * docs: fix grammatical errors * rip out fingerprint code a full length (40 characters) key ID is equivalent to the fingerprint. * refactor tests, add a couple more * test: added testcase for method: data * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * docs: correct yaml boolean type Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 5ddf004)
@grawlinson thanks a lot for your contribution! |
* add module pacman_key * add symlink and fix documentation for pacman_key * documentation fix for pacman_key * improve logic around user input * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Improve parameter checking required_one_of=[] is neat. Co-authored-by: Alexei Znamensky * Revert "Improve parameter checking" This reverts commit 044b0cb. * Simplify a bunch of code. * fix typos pointed out by yan12125 * replaced manual checks with required-if invocation * added default keyring to documentation * some initial tests * updated metadata * refactored to make sanity tests pass * refactor to make sanity tests pass ... part deux * refactor: simplify run_command invocations * test: cover check-mode and some normal operation * docs: fix grammatical errors * rip out fingerprint code a full length (40 characters) key ID is equivalent to the fingerprint. * refactor tests, add a couple more * test: added testcase for method: data * Update plugins/modules/packaging/os/pacman_key.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * docs: correct yaml boolean type Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 5ddf004) Co-authored-by: George Rawlinson <george@rawlinson.net.nz>
Wow, nice work and thank you for persevering <3 |
SUMMARY
Manage pacman's keyring of trusted keys with pacman-key. Similar to the apt_key & rpm_key modules. Useful when adding additional repositories that have signed packages/databases.
ISSUE TYPE
COMPONENT NAME
pacman_key
EDIT: This is originally from this PR on ansible/ansible.