Puppet Class: certs::ssltools::nssdb

Defined in:
manifests/ssltools/nssdb.pp

Overview

Sets up nssdb

Parameters:

  • nss_db_dir (Stdlib::Absolutepath) (defaults to: "${certs::pki_dir}/nssdb")
  • nss_db_password_file (Stdlib::Absolutepath) (defaults to: "${certs::pki_dir}/nss_db_password-file")
  • nss_db_password (String[10]) (defaults to: extlib::cache_data('foreman_cache_data', 'certs-nss-db-password', extlib::random_password(32)))
  • group (String[1]) (defaults to: 'qpidd')


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'manifests/ssltools/nssdb.pp', line 2

class certs::ssltools::nssdb (
  Stdlib::Absolutepath $nss_db_dir = "${certs::pki_dir}/nssdb",
  Stdlib::Absolutepath $nss_db_password_file = "${certs::pki_dir}/nss_db_password-file",
  String[10] $nss_db_password = extlib::cache_data('foreman_cache_data', 'certs-nss-db-password', extlib::random_password(32)),
  String[1] $group = 'qpidd',
) {
  stdlib::ensure_packages(['nss-tools'])

  file { $nss_db_password_file:
    ensure    => file,
    content   => $nss_db_password,
    show_diff => false,
    owner     => 'root',
    group     => $group,
    mode      => '0640',
  }

  nssdb { $nss_db_dir:
    ensure        => present,
    password_file => $nss_db_password_file,
    owner         => 'root',
    group         => $group,
    mode          => '0640',
  }
}