vaultlocker
Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
- Puppet >= 4.10.0 < 7.0.0
- , , ,
Start using this module
Add this module to your Puppetfile:
mod 'walkamongus-vaultlocker', '0.1.0'
Learn more about managing modules with a PuppetfileDocumentation
vaultlocker
Table of Contents
- Description
- Setup - The basics of getting started with vaultlocker
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
This module will install and configure vaultlocker and its requirements (such as the cryptsetup utility).
Setup
What vaultlocker affects
By default, this module will attempt to install and manage Python using the
https://forge.puppet.com/modules/puppet/python module and also install
the cryptsetup
package.
Beginning with vaultlocker
include vaultlocker
will install the vaultlocker tool and a default configuration file. The default configuration will not work as site-specific Vault configuration is necessary for Vault storage of encryption keys.
Usage
An example of passing in a working vaultlocker configuration:
class { 'vaultlocker':
config => {
'url' => https://my-vault-server:8200,
'approle' => 'approle-id',
'secret_id' => 'secret-id',
'backend' => 'secret/vaultlocker',
},
}
An example of passing in devices for encryption:
class { 'vaultlocker':
config => {
...
},
encrypted_block_devices => [
'/dev/sdd1',
'/dev/sde',
],
}
Limitations
Developed and tested only on RHEL 8.
Development
All pull requests welcome. pdk test unit
should pass for all contributions.
Reference
Table of Contents
Classes
Public Classes
vaultlocker
: This class installs a configures vaultlocker
Private Classes
vaultlocker::config
: Handles vaultlocker configurationsvaultlocker::install
: Handles optional python installation and vaultlocker installation
Defined types
vaultlocker::encrypt
: Automatically run vaultlocker to encrypt a block device.
Classes
vaultlocker
This module will optionally install Python and then install vaultlocker via pip as well as the cryptsetup tool.
A vaultlocker configuration file will also be placed in the correct location. An Array of block devices can
optionally be passed and a vaultlocker encrypt
command will be executed on each unencrypted device.
Examples
include vaultlocker
Parameters
The following parameters are available in the vaultlocker
class:
package_ensure
package_url
pip_env_variables
cmd_env_variables
manage_python
python_params
config
proxy
encrypted_block_devices
package_ensure
Data type: Variant[Enum[present, absent, latest], String[1]]
Specifies the vaultlocker pip package ensure value.
package_url
Data type: Variant[Boolean, String]
Specifies the vaultlocker pip package url to use for installation if necessary (such as for installing from a Git repo).
pip_env_variables
Data type: Array
Specifies an Array of environment variables to pass to pip for the vaultlocker package installation.
cmd_env_variables
Data type: Array
Specifies an Array of environment variables to pass to the vaultlocker encrypt
command.
manage_python
Data type: Boolean
Specifies whether to attempt to manage Python and part of the module.
python_params
Data type: Hash
Specifies a free-form Hash of parameters and their values to pass to the Python class if Python is being managed.
config
Data type: Hash[String, String]
Specifies a Hash of configs and values for configuration of the vaultlocker tool.
proxy
Data type: Optional[Stdlib::Httpurl]
Specifies a proxy if one is needed for external/internet connections.
encrypted_block_devices
Data type: Array[Stdlib::Unixpath]
Specifies an Array of block device paths. Each block device would be encrypted with vaultlocker if it is not already encrypted.
Defined types
vaultlocker::encrypt
This type with execute vaultlocker encrypt
on a block device unless the device is already encrypted.
Examples
vaultlocker::encrypt { '/dev/sdb': }
Parameters
The following parameters are available in the vaultlocker::encrypt
defined type:
device
Data type: Stdlib::Unixpath
Specifies the full path to the block device that vaultlocker will encrypt.
Default value: $title
environment
Data type: Optional[Array]
Specifies an Array of environment variables that are passed to the vaultlocker encrypt
command.
This is useful because the Python requests
module does not use the system CA trust store. You can
inject a specific CA cert bundle that includes your Vault server by setting this parameter to
something like environment => ['REQUESTS_CA_BUNDLE=/path/to/my/ca-bundle.crt']
Default value: undef
Dependencies
- puppetlabs-stdlib (>= 1.0.0 < 8.0.0)
- puppet-python (>= 4.0.0 < 6.0.0)