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

add task for testing to remove gpg key using key id #79729

Merged
merged 1 commit into from Jan 17, 2023

Conversation

gryu7
Copy link
Contributor

@gryu7 gryu7 commented Jan 13, 2023

SUMMARY

At integration test for rpm_key module, there are various methods for adding/removing gpg keys.
However removing gpg key using key id is missing. This PR adds it.

Fixes #79584

ISSUE TYPE
  • Test Pull Request
COMPONENT NAME

rpm_key

ADDITIONAL INFORMATION

Following is the output from tasks I added.

TASK [get keyid] *********************************************************************************************************************************************************************************************
changed: [localhost] => {"changed": true, "cmd": "rpm -q gpg-pubkey | head -n 1 | xargs rpm -q --qf %{version}", "delta": "0:00:00.017863", "end": "2023-01-13 08:31:36.406416", "msg": "", "rc": 0, "start": "2023-01-13 08:31:36.388553", "stderr": "", "stderr_lines": [], "stdout": "352c64e5", "stdout_lines": ["352c64e5"]}

TASK [remove GPG key using keyid] ****************************************************************************************************************************************************************************
changed: [localhost] => {"changed": true, "failed_when_result": false}

TASK [remove GPG key using keyid (idempotent)] ***************************************************************************************************************************************************************
ok: [localhost] => {"changed": false}

TASK [verify idempotent (key_id)] ****************************************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [add very first key on system again] ********************************************************************************************************************************************************************
changed: [localhost] => {"changed": true}

@ansibot ansibot added affects_2.15 needs_triage Needs a first human triage before being processed. labels Jan 13, 2023
@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Jan 17, 2023
@mkrizek mkrizek merged commit 40dd762 into ansible:devel Jan 17, 2023
@ansible ansible locked and limited conversation to collaborators Jan 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rpm_key integration test should also test for deleting by key ID
3 participants