From bbbf42a5b914a719852cbd14c4f89ad740526c75 Mon Sep 17 00:00:00 2001 From: Vadym Chepkov Date: Thu, 30 Mar 2017 10:20:09 -0400 Subject: [PATCH] pass 'release' attribute to sub classes prior to this this commit 'release' atribute from 'main' class wasn't passed to sub-classes construct '! defined Class' provides random results, parser dependable and shouldn't be used --- manifests/init.pp | 1 + manifests/install.pp | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 3926462e..4cf745c9 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -59,6 +59,7 @@ server_package => $server_package, client => $client, client_package => $client_package, + release => $release, version => $version, repo => $repo, } diff --git a/manifests/install.pp b/manifests/install.pp index ada1a4b5..fb227072 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -32,17 +32,16 @@ Boolean $server = $gluster::params::install_server, Boolean $client = $gluster::params::install_client, Boolean $repo = $gluster::params::repo, + String $release = $gluster::params::release, String $version = $gluster::params::version, String $server_package = $gluster::params::server_package, String $client_package = $gluster::params::client_package, ) inherits ::gluster::params { if $repo { - # install the correct repo - if ! defined ( Class[::gluster::repo] ) { - class { '::gluster::repo': - version => $version, - } + class { '::gluster::repo': + release => $release, + version => $version, } }