diff --git a/README.md b/README.md index 36eab9b..591d628 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ This module supports two ways of distributing the PBIS Open packages: The default is to use Puppet's built-in fileserver. -In either case, download the necessary packages from the [BeyondTrust website](http://www.beyondtrust.com/Technical-Support/Downloads/PowerBroker-Identity-Services-Open-Edition/?Pass=True). Extract the architecture-specific `pbis-open` `.rpm` or `.deb` file from the self-extracting `sh` archive. +In either case, download the necessary packages from the [BeyondTrust website](http://download1.beyondtrust.com/Technical-Support/Downloads/PowerBroker-Identity-Services-Open-Edition/?Pass=True). Extract the architecture-specific `pbis-open` `.rpm` or `.deb` file from the self-extracting `sh` archive. ### Using Puppet's built-in fileserver @@ -32,9 +32,13 @@ Rename the `pbis-open` package files according to the following convention: pbis-open.amd64.deb pbis-open.i386.deb + pbis-open-upgrade.amd64.deb + pbis-open-upgrade.i386.deb pbis-open.x86_64.rpm pbis-open.i386.rpm + pbis-open-upgrade.x86_64.rpm + pbis-open-upgrade.i386.rpm and place them in the module's `files/` folder. @@ -62,6 +66,17 @@ The service name may not be 'lsass' on newer version of PBIS and may be 'lwsmd'. } } +### Compatibility to PBIS <=v7.1.0 + +PBIS version prior or equal to v7.1.0 do not require the `pbis-open-upgrade` package. Disable it's use by setting: + + node 'workstation' { + class { 'pbis': + ... + package_prerequired => '', + } + } + ## Dependencies This module requires the `osfamily` fact, which depends on Facter 1.6.1+. @@ -81,3 +96,5 @@ Please open a pull request with any changes or bugfixes. Likewise Open was acquired by BeyondTrust in 2011 and rebranded as PowerBroker Identity Services Open Edition. The project page is at [powerbrokeropen.org](http://www.powerbrokeropen.org). The original Likewise Open package is included in the Ubuntu repositories, but has not been updated in years. + +In Ubuntu 14.04, the Likewise Open package got removed in the default repositories. More details found in [this bug](https://bugs.launchpad.net/ubuntu/+source/likewise-open/+bug/1295031) diff --git a/manifests/init.pp b/manifests/init.pp index 9ef9521..f296b39 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -6,7 +6,8 @@ $enabled_modules = $pbis::params::enabled_modules, $disabled_modules = $pbis::params::disabled_modules, $package = $pbis::params::package, - $package_file = $pbis::params::package_file, + $package_prerequired = $pbis::params::package_prerequired, + $package_file_suffix = $pbis::params::package_file_suffix, $package_file_provider = $pbis::params::package_file_provider, $service_name = $pbis::params::service_name, $assume_default_domain = $pbis::params::assume_default_domain, @@ -26,21 +27,47 @@ if $use_repository == true { # If the package is on an external repo, install it normally. package { $package: - ensure => installed, + ensure => latest, } } elsif $use_repository == false { # Otherwise, download and install the package from the puppetmaster... # a low-performance repo for the poor man - file { "/opt/${package_file}": + + # Compatibilitity switch for pbis <= v7.1.0 + # require also the prerequired package if it is not set to empty string + if $package_prerequired == "" { + $require_for_package = File["/opt/${package}.${package_file_suffix}"] + } + else { + $require_for_package = [ + File["/opt/${package}.${package_file_suffix}"], + Package[$package_prerequired] + ] + } + + file { "/opt/${package}.${package_file_suffix}": ensure => file, - source => "puppet:///modules/pbis/${package_file}", + source => "puppet:///modules/pbis/${package}.${package_file_suffix}", } package { $package: - ensure => installed, - source => "/opt/${package_file}", + ensure => latest, + source => "/opt/${package}.${package_file_suffix}", provider => $package_file_provider, - require => File["/opt/${package_file}"], + require => $require_for_package + } + # install the prerequired package if it is not set to empty string + unless $package_prerequired == "" { + file { "/opt/${package_prerequired}.${package_file_suffix}": + ensure => file, + source => "puppet:///modules/pbis/${package_prerequired}.${package_file_suffix}", + } + package { $package_prerequired: + ensure => latest, + source => "/opt/${package_prerequired}.${package_file_suffix}", + provider => $package_file_provider, + require => File["/opt/${package_prerequired}.${package_file_suffix}"], + } } } else { diff --git a/manifests/params.pp b/manifests/params.pp index 154a63c..79cb580 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -4,6 +4,11 @@ $use_repository = false $package = 'pbis-open' $service_name = 'lsass' + + # parameter ignored when using repository, but needed when using builtin + # fileserver after pbis v7.1.1 (see bug #3) + # set this to empty string to disable the preinstallation + $package_prerequired = 'pbis-open-upgrade' # domainjoin-cli options $ou = undef @@ -30,14 +35,14 @@ # PBIS Open is packaged for Red Hat, Suse, and Debian derivatives. # When using Puppet's built-in fileserver, choose the .deb or .rpm # automatically. - $package_file = $::osfamily ? { - 'Debian' => "${package}.${::architecture}.deb", - '/(RedHat|Suse)/' => "${package}.${::architecture}.rpm", + $package_file_suffix = $::osfamily ? { + 'Debian' => "${::architecture}.deb", + /(RedHat|Suse)/ => "${::architecture}.rpm", default => fail("Unsupported operating system: ${::operatingsystem}."), } $package_file_provider = $::osfamily ? { 'Debian' => 'dpkg', - '/(RedHat|Suse)/' => 'rpm', + /(RedHat|Suse)/ => 'rpm', default => fail("Unsupported operating system: ${::operatingsystem}."), } }