apt_key

Collection: builtin

Full Name: parallax.builtin.apt_key

Aliases: ansible.builtin.apt_key, apt_key

Synopsis

Add or remove trusted apt signing keys

Parameters

NameTypeRequiredDefaultDescription
idstringThe identifier of the key
datastringThe keyfile contents to add to the keyring
filestringThe path to a keyfile on the remote server to add to the keyring
keyringstringThe full path to specific keyring file in /etc/apt/trusted.gpg.d/
urlstringThe URL to retrieve key from
keyserverstringThe keyserver to retrieve key from
statestringpresentabsent or present: ensures that the key is added or revoked from the keyring. Choices: absent, present
validate_certsbooltrueIf false, SSL certificates will not be validated

Example

- name: Trust the NodeSource signing key
  apt_key:
    url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
    state: present