From 1bab4af022f20809821c5e8bcd031541f8f84e49 Mon Sep 17 00:00:00 2001 From: Riley Shott Date: Sat, 12 Dec 2015 22:53:15 -0800 Subject: [PATCH 1/2] Fixes #242 Removed the management of selinux --- metadata.rb | 1 - recipes/default.rb | 5 ---- test/spec/recipes/default_spec.rb | 42 ------------------------------- 3 files changed, 48 deletions(-) diff --git a/metadata.rb b/metadata.rb index ff52cf5f..f10fa229 100644 --- a/metadata.rb +++ b/metadata.rb @@ -21,7 +21,6 @@ depends 'libartifact', '~> 1.3' depends 'poise', '~> 2.2' depends 'poise-service', '~> 1.0' -depends 'selinux', '~> 0.9' source_url 'https://github.com/johnbellone/consul-cookbook' if respond_to?(:source_url) issues_url 'https://github.com/johnbellone/consul-cookbook/issues' if respond_to?(:issues_url) diff --git a/recipes/default.rb b/recipes/default.rb index 158327d9..a169fc1c 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -5,11 +5,6 @@ # Copyright 2014, 2015 Bloomberg Finance L.P. # -if node['os'] == 'linux' - node.default['selinux']['state'] = 'permissive' - include_recipe 'selinux::default' -end - if node['firewall']['allow_consul'] include_recipe 'firewall::default' diff --git a/test/spec/recipes/default_spec.rb b/test/spec/recipes/default_spec.rb index 12f0c5be..629db2d8 100644 --- a/test/spec/recipes/default_spec.rb +++ b/test/spec/recipes/default_spec.rb @@ -10,46 +10,4 @@ chef_run # This should not raise an error end end - - context 'When selinux is set to be permissive, on a RHEL distribution' do - let(:chef_run) do - ChefSpec::SoloRunner.new do |node, server| - node.automatic['os'] = 'linux' - node.automatic['platform_family'] = 'rhel' - node.set['selinux']['state'] = 'permissive' - end.converge(described_recipe) - end - - it 'selinux_state action is permissive' do - expect(chef_run).to permissive_selinux_state('SELinux Permissive') - end - end - - context 'When selinux is set to be disabled, on a RHEL distribution' do - let(:chef_run) do - ChefSpec::SoloRunner.new do |node, server| - node.automatic['os'] = 'linux' - node.automatic['platform_family'] = 'rhel' - node.set['selinux']['state'] = 'disabled' - end.converge(described_recipe) - end - - it 'selinux_state action is disabled' do - expect(chef_run).to disabled_selinux_state('SELinux Disabled') - end - end - - context 'When selinux is set to be enforcing, on a RHEL distribution' do - let(:chef_run) do - ChefSpec::SoloRunner.new do |node, server| - node.automatic['os'] = 'linux' - node.automatic['platform_family'] = 'rhel' - node.set['selinux']['state'] = 'enforcing' - end.converge(described_recipe) - end - - it 'selinux_state action is enforcing' do - expect(chef_run).to enforcing_selinux_state('SELinux Enforcing') - end - end end From 47e17296c7620d5bc181cfcb4ff42ce5470a24d5 Mon Sep 17 00:00:00 2001 From: Riley Shott Date: Sat, 12 Dec 2015 22:56:42 -0800 Subject: [PATCH 2/2] Reverted #253 PR #253 broke the world after #252 was merged --- libraries/consul_ui.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/consul_ui.rb b/libraries/consul_ui.rb index 5f6c3358..3e72f96d 100644 --- a/libraries/consul_ui.rb +++ b/libraries/consul_ui.rb @@ -26,7 +26,7 @@ class ConsulUI < Chef::Resource # @!attribute binary_url # @return [String] - attribute(:binary_url, kind_of: String, default: 'https://releases.hashicorp.com/consul/%{version}/consul_%{filename}.zip') + attribute(:binary_url, kind_of: String, default: 'https://releases.hashicorp.com/consul/%{version}/%{filename}.zip') # @!attribute source_url # @return [String]