/puppet-gnupg

Puppet module supporting GnuPG key management

Primary LanguageRubyApache License 2.0Apache-2.0

GnuPG module for Puppet

Table of Contents

  1. Description
  2. Usage - Configuration options and additional functionality
  3. Limitations - OS compatibility, etc.
  4. Development - Guide for contributing to the module

Overview

Manage PGP public and private keys in GnuPG keyrings.

Setup

The command gnupg is required for the functions provided in this module.

Including the base class in a manifest will ensure the appropriate GnuPG package is installed for a supported operating system.

include gnupg

This is for convenience and may be skipped if you prefer to manage installing the GnuPG command line tool.

Usage

Add public key from a remote server

gnupg_key { 'hkp_server_20BC0A86':
  ensure     => present,
  key_id     => '20BC0A86',
  user       => 'root',
  key_server => 'hkp://pgp.mit.edu/',
  key_type   => 'public',
}

Add public key from puppet

gnupg_key { 'jenkins_foo_key':
  ensure     => present,
  key_id     => 'D50582E6',
  user       => 'foo',
  key_source => 'puppet:///modules/gnupg/D50582E6.key',
  key_type   => 'public',
}

Remove public key

gnupg_key { 'root_remove_20BC0A86':
  ensure   => absent,
  key_id   => '20BC0A86',
  user     => 'root',
  key_type => 'public',
}

Remove both private and public keys

gnupg_key { 'root_remove_20BC0A66':
  ensure   => absent,
  key_id   => '20BC0A66',
  user     => 'root',
  key_type => 'both',
}

Limitations

Refer to the Version Information section for this module on the Puppet Forge, or the operatingsystem_support key in metadata.json of the source code.

Development

Contributions are welcome and encouraged! Please submit a pull request to the project on Github. Priority will be given to contributions that include tests and documentation. If you're unfamiliar, that's okay, someone will help guide you through the process.

Acknowledgements

Forked from version 1.2.3 of the gnupg module developed by Dejan Golja