From 7d9cd1e1e156115bb9eb1d40c7862beb307249e5 Mon Sep 17 00:00:00 2001 From: Clayton O'Neill Date: Mon, 23 Mar 2015 15:54:55 +0000 Subject: [PATCH] Don't create rabbitmqadmin.conf if disabled If the admin service isn't enabled then we shouldn't create the config file. --- manifests/config.pp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index b13b63a77..5d5fdcaa6 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -78,14 +78,16 @@ notify => Class['rabbitmq::service'], } - file { 'rabbitmqadmin.conf': - ensure => file, - path => '/etc/rabbitmq/rabbitmqadmin.conf', - content => template('rabbitmq/rabbitmqadmin.conf.erb'), - owner => '0', - group => '0', - mode => '0644', - require => File['/etc/rabbitmq'], + if $admin_enable { + file { 'rabbitmqadmin.conf': + ensure => file, + path => '/etc/rabbitmq/rabbitmqadmin.conf', + content => template('rabbitmq/rabbitmqadmin.conf.erb'), + owner => '0', + group => '0', + mode => '0644', + require => File['/etc/rabbitmq'], + } } if $config_cluster {