logic around the apt-force-yes. #302

Merged
merged 2 commits into from Sep 8, 2015
View
@@ -26,3 +26,21 @@ suites:
- name: lwrps
run_list:
- recipe[rabbitmq_test::lwrps]
+ - name: default-force-yes
+ run_list:
+ - recipe[rabbitmq::default]
+ attributes:
+ apt:
+ confd:
+ assume_yes: true
+ force-yes: true
+ excludes: ["centos-6.5", "centos-7.0"]
+ - name: default-force-yes-false
+ run_list:
+ - recipe[rabbitmq::default]
+ attributes:
+ apt:
+ confd:
+ assume_yes: false
+ force-yes: false
+ excludes: ["centos-6.5", "centos-7.0"]
@@ -131,6 +131,9 @@
default['rabbitmq']['config_root'] = '/opt/local/etc/rabbitmq'
default['rabbitmq']['config'] = "#{node['rabbitmq']['config_root']}/rabbitmq"
default['rabbitmq']['erlang_cookie_path'] = '/var/db/rabbitmq/.erlang.cookie'
+when 'debian'
+ default['apt']['confd']['assume_yes'] = false
+ default['apt']['confd']['force-yes'] = false
end
# heartbeat
View
@@ -3,7 +3,7 @@
maintainer_email 'jj@chef.io'
license 'Apache 2.0'
description 'Installs and configures RabbitMQ server'
-version '4.2.1'
+version '4.2.2'
recipe 'rabbitmq', 'Install and configure RabbitMQ'
recipe 'rabbitmq::cluster', 'Set up RabbitMQ clustering.'
recipe 'rabbitmq::plugin_management', 'Manage plugins with node attributes'
@@ -1,2 +1,2 @@
-APT::Get::Assume-Yes "<%= node['apt']['confd']['assume_yes'] ? 1 : 0 %>";
-APT::Get::force-yes "<%= node['apt']['confd']['force-yes'] ? 1 : 0 %>";
+APT::Get::Assume-Yes "<%= node['apt']['confd']['assume_yes'] ? true : false || false %>";
+APT::Get::force-yes "<%= node['apt']['confd']['force-yes'] ? true : false || false %>";