# salt.states.gpg

## Manage GPG keychains

Added in version 2016.3.0.

salt.states.gpg.absent(name, keys=None, user=None, gnupghome=None, keyring=None, keyring_absent_if_empty=False, **kwargs)

  Ensure a GPG public key is absent from the keychain.

  name

    The key ID of the GPG public key.

  keys

    The key ID or key IDs to remove from the GPG keychain.

  user

    Remove GPG keys from the specified user's keychain.

  gnupghome

    Override GnuPG home directory.

  keyring

    Limit the operation to this specific keyring, specified as a local filesystem path.

    Added in version 3007.0.

  keyring_absent_if_empty

    Make sure to not leave behind an empty keyring file if `keyring` was specified. Defaults to false.

    Added in version 3007.0.

salt.states.gpg.present(name, keys=None, user=None, keyserver=None, gnupghome=None, trust=None, keyring=None, **kwargs)

  Ensure a GPG public key is present in the GPG keychain.

  name

    The key ID of the GPG public key.

  keys

    The key ID or key IDs to add to the GPG keychain.

  user

    Add GPG keys to the specified user's keychain.

  keyserver

    The keyserver to retrieve the keys from.

  gnupghome

    Override GnuPG home directory.

  trust

    Trust level for the key in the keychain, ignored by default. Valid trust levels: expired, unknown, not_trusted, marginally, fully, ultimately

  keyring

    Limit the operation to this specific keyring, specified as a local filesystem path.

    Added in version 3007.0.