Skip to content

Commit

Permalink
Introduced backward compatibility for $manage_repos
Browse files Browse the repository at this point in the history
$manage_repos was initially proposed for removal. This was making
this module backward incompatible. This commit reintroduces
$manage_repos, introducing a deprecation warning if used and
falling back to the $ensure_repos behaviour.
  • Loading branch information
queeno committed Dec 5, 2014
1 parent a5879f4 commit 54fdab4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
$package_provider = $rabbitmq::params::package_provider,
$package_source = $rabbitmq::params::package_source,
$repos_ensure = $rabbitmq::params::repos_ensure,
$manage_repos = $rabbitmq::params::manage_repos,
$plugin_dir = $rabbitmq::params::plugin_dir,
$port = $rabbitmq::params::port,
$tcp_keepalive = $rabbitmq::params::tcp_keepalive,
Expand Down Expand Up @@ -123,7 +124,11 @@
include '::rabbitmq::service'
include '::rabbitmq::management'

if $rabbitmq::manage_repos == true {
if $manage_repos != undef {
warning('$manage_repos is now deprecated. Please use $repos_ensure instead')
}

if $manage_repos != false {
case $::osfamily {
'RedHat', 'SUSE':
{ include '::rabbitmq::repo::rhel' }
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
$package_apt_pin = ''
$package_gpg_key = 'http://www.rabbitmq.com/rabbitmq-signing-key-public.asc'
$repos_ensure = true
$manage_repos = undef
$service_ensure = 'running'
$service_manage = true
#config
Expand Down

0 comments on commit 54fdab4

Please sign in to comment.