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

pull/79758/head
gryu7 2 years ago committed by GitHub
parent 1852f9fab4
commit 40dd762e68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -123,6 +123,32 @@
assert:
that: "'rsa sha1 (md5) pgp md5 OK' in sl_check.stdout or 'digests signatures OK' in sl_check.stdout"
- name: get keyid
shell: "rpm -q gpg-pubkey | head -n 1 | xargs rpm -q --qf %{version}"
register: key_id
- name: remove GPG key using keyid
rpm_key:
state: absent
key: "{{ key_id.stdout }}"
register: remove_keyid
failed_when: remove_keyid.changed == false
- name: remove GPG key using keyid (idempotent)
rpm_key:
state: absent
key: "{{ key_id.stdout }}"
register: key_id_idempotence
- name: verify idempotent (key_id)
assert:
that: "not key_id_idempotence.changed"
- name: add very first key on system again
rpm_key:
state: present
key: https://ci-files.testing.ansible.com/test/integration/targets/rpm_key/RPM-GPG-KEY-EPEL-7
- name: Issue 20325 - Verify fingerprint of key, invalid fingerprint - EXPECTED FAILURE
rpm_key:
key: https://ci-files.testing.ansible.com/test/integration/targets/rpm_key/RPM-GPG-KEY.dag

Loading…
Cancel
Save