Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Dependency bugfix + Selecting puppet version #19

Closed
wants to merge 1 commit into from

3 participants

@vStone
  • Fix dependency generate_ca and the config file
  • Added a parameter that allows overriding the puppet version to install. Defaults to present in puppet::params.
@GregSutcliffe GregSutcliffe commented on the diff
manifests/server/install.pp
@@ -1,5 +1,5 @@
class puppet::server::install {
- package { $puppet::server::master_package: ensure => installed }
+ package { $puppet::server::master_package: ensure => $::puppet::server::version }
@GregSutcliffe Collaborator

what OS's have you tested this on? I'm pretty sure I tried to do this on Debian and it blew up - because we're not also specifying the version of puppet-common, which leads to a conflict...

@vStone
vStone added a note

k, gonna test that first then and adjust if needed.

@GregSutcliffe Collaborator

Actually, we can probably fix this by specifying $puppet::server::master_package as an array in the debian part of puppet params.pp...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@GregSutcliffe
Collaborator

I like the headers. Can't test the version-of-puppet part on Debian, @domcleal / @skottler can you oblige?

@vStone

Still needs testing.

@vStone

Since I didn't have any time to actually test the puppet module (no puppetmaster on debian available) I tested the following snippit on my mailserver :)

$packages = ['puppetmaster-common', 'puppetmaster']
$version = '2.7.20-1puppetlabs1'
package {$packages: ensure => $version, }

Output

notice: /Stage[main]//Package[puppetmaster-common]/ensure: ensure changed 'purged' to '2.7.20-1puppetlabs1'
notice: /Stage[main]//Package[puppetmaster]/ensure: ensure changed 'purged' to '2.7.20-1puppetlabs1'
notice: Finished catalog run in 22.15 seconds

Looking good no?

@GregSutcliffe
Collaborator

I can test this tomorrow

@skottler
Collaborator

Thanks @vStone! Would you mind splitting this pull request out into a few separate ones since there are a couple goals included right now?

@vStone vStone Allow specifying what puppet version to use. Defaults to "present".
This required including both puppet and puppet-common for debian. Same
for puppetmaster and puppetmaster-common.
e11e605
@vStone

See split out pull requests. Referenced here for ... reference !

@vStone vStone closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 28, 2012
  1. @vStone

    Allow specifying what puppet version to use. Defaults to "present".

    vStone authored
    This required including both puppet and puppet-common for debian. Same
    for puppetmaster and puppetmaster-common.
This page is out of date. Refresh to see the latest.
View
3  manifests/init.pp
@@ -16,7 +16,8 @@
$post_hook_content = $puppet::params::post_hook_content,
$post_hook_name = $puppet::params::post_hook_name,
$agent_template = $puppet::params::agent_template,
- $master_template = $puppet::params::master_template
+ $master_template = $puppet::params::master_template,
+ $version = $puppet::params::version
) inherits puppet::params {
class { 'puppet::install': }~>
class { 'puppet::config': }
View
4 manifests/install.pp
@@ -1,3 +1,5 @@
class puppet::install {
- package { 'puppet': ensure => installed }
+
+ package { $puppet::params::client_package: ensure => $::puppet::version }
+
}
View
7 manifests/params.pp
@@ -3,6 +3,7 @@
include foreman::params
# Basic config
+ $version = 'present'
$user = 'puppet'
$dir = '/etc/puppet'
$ca = true
@@ -40,9 +41,13 @@
$ssl_dir = '/var/lib/puppet/ssl'
$master_package = $::operatingsystem ? {
- /(Debian|Ubuntu)/ => ['puppetmaster'],
+ /(Debian|Ubuntu)/ => ['puppetmaster-common','puppetmaster'],
default => ['puppet-server'],
}
+ $client_package = $::operatingsystem ? {
+ /(Debian|Ubuntu)/ => ['puppet-common','puppet'],
+ default => ['puppet'],
+ }
# This only applies to puppet::cron
$cron_range = 60 # the maximum value for our cron
View
3  manifests/server.pp
@@ -22,7 +22,8 @@
$post_hook_content = $puppet::params::post_hook_content,
$post_hook_name = $puppet::params::post_hook_name,
$agent_template = $puppet::params::agent_template,
- $master_template = $puppet::params::master_template
+ $master_template = $puppet::params::master_template,
+ $version = $puppet::params::version
) inherits puppet::params {
class { 'puppet::server::install': }~>
class { 'puppet::server::config': }
View
2  manifests/server/install.pp
@@ -1,5 +1,5 @@
class puppet::server::install {
- package { $puppet::server::master_package: ensure => installed }
+ package { $puppet::server::master_package: ensure => $::puppet::server::version }
@GregSutcliffe Collaborator

what OS's have you tested this on? I'm pretty sure I tried to do this on Debian and it blew up - because we're not also specifying the version of puppet-common, which leads to a conflict...

@vStone
vStone added a note

k, gonna test that first then and adjust if needed.

@GregSutcliffe Collaborator

Actually, we can probably fix this by specifying $puppet::server::master_package as an array in the debian part of puppet params.pp...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
}
Something went wrong with that request. Please try again.