- Docs »
- rpm_key - Adds or removes a gpg key from the rpm db
-
You are reading an unmaintained version of the Ansible documentation. Unmaintained Ansible versions can contain unfixed security vulnerabilities (CVE). Please upgrade to a maintained version. See the latest Ansible documentation.
rpm_key - Adds or removes a gpg key from the rpm db
- Adds or removes (rpm –import) a gpg key to your rpm database.
Parameter |
Choices/Defaults |
Comments |
key
required |
|
Key that will be modified. Can be a url, a file, or a keyid if the key already exists in the database.
|
state
|
Choices:
- absent
present ←
|
If the key will be imported or removed from the rpm db.
|
validate_certs
bool |
|
If no and the key is a url starting with https, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.
|
# Example action to import a key from a url
- rpm_key:
state: present
key: http://apt.sw.be/RPM-GPG-KEY.dag.txt
# Example action to import a key from a file
- rpm_key:
state: present
key: /path/to/key.gpg
# Example action to ensure a key is not present in the db
- rpm_key:
state: absent
key: DEADB33F
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is flagged as core which means that it is maintained by the Ansible Core Team. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Core Team, see here.
Hint
If you notice any issues in this documentation you can edit this document to improve it.