Puppet Function: peadm::generate_pe_conf
- Defined in:
-
functions/generate_pe_conf.pp
- Function type:
- Puppet Language
Summary
Generate a pe.conf file in JSON format
Overview
peadm::generate_pe_conf(Hash $settings) ⇒ String
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'functions/generate_pe_conf.pp', line 7
function peadm::generate_pe_conf (
Hash $settings,
) >> String {
# Check that console_admin_password is present
unless $settings['console_admin_password'] =~ String {
fail('pe.conf must have the console_admin_password set')
}
# Remove anything that is undef, then output to JSON (and therefore HOCON,
# because HOCON is a superset of JSON)
stdlib::to_json_pretty($settings.filter |$key,$value| {
$value != undef
})
}
|