Skip to content

Commit 17a15aa

Browse files
committed
Add puppetdb_version parameter to master,storeconfigs & tests
1 parent 5859adf commit 17a15aa

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

manifests/master.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
$dns_alt_names = ['puppet'],
8787
$digest_algorithm = $::puppet::params::digest_algorithm,
8888
$generate_ssl_certs = true,
89+
$puppetdb_version = 'present',
8990
) inherits puppet::params {
9091

9192
anchor { 'puppet::master::begin': }
@@ -195,6 +196,7 @@
195196
puppet_master_package => $puppet_master_package,
196197
puppetdb_startup_timeout => $puppetdb_startup_timeout,
197198
puppetdb_strict_validation => $puppetdb_strict_validation,
199+
puppetdb_version => $puppetdb_version,
198200
} ->
199201
Anchor['puppet::master::end']
200202
}

manifests/storeconfigs.pp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@
2727
# }
2828
#
2929
class puppet::storeconfigs(
30-
$dbserver,
3130
$dbport,
32-
$puppet_service,
31+
$dbserver,
3332
$puppet_master_package,
33+
$puppet_service,
3434
$puppetdb_startup_timeout,
3535
$puppetdb_strict_validation,
36+
$puppetdb_version,
37+
$puppet_conf = $::puppet::params::puppet_conf,
3638
$puppet_confdir = $::puppet::params::confdir,
37-
$puppet_conf = $::puppet::params::puppet_conf
3839
)inherits puppet::params {
3940

4041
##If we point at a puppetdb on this machine
@@ -57,6 +58,7 @@
5758
puppetdb_startup_timeout => $puppetdb_startup_timeout,
5859
strict_validation => $puppetdb_strict_validation,
5960
require => $require,
61+
puppetdb_version => $puppetdb_version,
6062
}
6163
}
6264
}

spec/classes/puppet_storeconfigs_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
:puppet_conf => '/etc/puppet/puppet.conf',
1919
:puppet_master_package => 'puppstmaster',
2020
:puppetdb_startup_timeout => '60',
21-
:puppetdb_strict_validation => true
21+
:puppetdb_strict_validation => true,
22+
:puppetdb_version => 'present'
2223
}
2324
end
2425

@@ -44,7 +45,8 @@
4445
:puppet_conf => '/etc/puppet/puppet.conf',
4546
:puppet_master_package => 'puppstmaster',
4647
:puppetdb_startup_timeout => '60',
47-
:puppetdb_strict_validation => true
48+
:puppetdb_strict_validation => true,
49+
:puppetdb_version => 'present'
4850
}
4951
end
5052

tests/storedconfigs.pp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
class {'puppet::storeconfigs':
22
dbserver => 'test.example.com',
33
dbport => '8081',
4-
puppet_service => Service['httpd']
4+
puppet_service => Service['httpd'],
5+
puppetdb_version => 'present'
56
}

0 commit comments

Comments
 (0)