Skip to content

Commit 6f4489e

Browse files
Merge pull request #45 from gertvdijk/digest_algorithm
Add the ability to manage the digest_algorithm setting
2 parents 8b8e27f + 6788770 commit 6f4489e

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

manifests/agent.pp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
# ['trusted_node_data'] - Enable the trusted facts hash
2323
# ['listen'] - If puppet agent should listen for connections
2424
# ['reportserver'] - The server to send transaction reports to.
25+
# ['digest_algorithm'] - The algorithm to use for file digests.
2526
#
2627
# Actions:
2728
# - Install and configures the puppet agent
@@ -56,6 +57,7 @@
5657
$trusted_node_data = undef,
5758
$listen = false,
5859
$reportserver = '$server',
60+
$digest_algorithm = $::puppet::params::digest_algorithm,
5961
) inherits puppet::params {
6062

6163
if ! defined(User[$::puppet::params::puppet_user]) {
@@ -272,4 +274,9 @@
272274
setting => 'reportserver',
273275
value => $reportserver,
274276
}
277+
ini_setting {'puppetagentdigestalgorithm':
278+
ensure => present,
279+
setting => 'digest_algorithm',
280+
value => $digest_algorithm,
281+
}
275282
}

manifests/master.pp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
# ['parser'] - Which parser to use
3030
# ['puppetdb_startup_timeout'] - The timeout for puppetdb
3131
# ['dns_alt_names'] - Comma separated list of alternative DNS names
32+
# ['digest_algorithm'] - The algorithm to use for file digests.
3233
#
3334
# Requires:
3435
#
@@ -77,6 +78,7 @@
7778
$puppetdb_startup_timeout = '60',
7879
$puppetdb_strict_validation = $::puppet::params::puppetdb_strict_validation,
7980
$dns_alt_names = ['puppet'],
81+
$digest_algorithm = $::puppet::params::digest_algorithm,
8082
) inherits puppet::params {
8183

8284
anchor { 'puppet::master::begin': }
@@ -273,5 +275,11 @@
273275
value => join($dns_alt_names, ","),
274276
}
275277

278+
ini_setting {'puppetmasterdigestalgorithm':
279+
ensure => present,
280+
setting => 'digest_algorithm',
281+
value => $digest_algorithm,
282+
}
283+
276284
anchor { 'puppet::master::end': }
277285
}

manifests/params.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
$parser = 'current'
3131
$puppetdb_strict_validation = true
3232
$environments = 'config'
33+
$digest_algorithm = 'md5'
3334

3435
# Only used when environments == directory
3536
$environmentpath = '$confdir/environments'

0 commit comments

Comments
 (0)