diff --git a/README.md b/README.md index aae38a5..b39e06f 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ This will create system init scripts for managing logstash instance. It will t see [resources/service.rb](resources/service.rb) -_experimental support for pleaserun has been added. Only `native` for `Ubuntu 12.04` has been thoroughly tested._ +_experimental support for pleaserun has been added. Only `native` for `Ubuntu 16.04` has been thoroughly tested._ ## logstash_config diff --git a/metadata.rb b/metadata.rb index 12a5116..930c682 100644 --- a/metadata.rb +++ b/metadata.rb @@ -22,6 +22,6 @@ depends 'curl' depends 'beaver' -chef_version '>= 13.0' if respond_to?(:chef_version) +chef_version '>= 12.18' if respond_to?(:chef_version) issues_url 'https://github.com/lusis/chef-logstash/issues' source_url 'https://github.com/lusis/chef-logstash' diff --git a/providers/instance.rb b/providers/instance.rb index 2d352f1..2b79c29 100644 --- a/providers/instance.rb +++ b/providers/instance.rb @@ -184,6 +184,7 @@ def load_current_resource mode '0755' owner ls[:user] group ls[:group] + recursive true end new_resource.updated_by_last_action(idr.updated_by_last_action?) @@ -218,7 +219,7 @@ def load_current_resource er = execute 'build-logstash' do cwd "#{ls[:instance_dir]}/source" environment(JAVA_HOME: @java_home) - user ls_user # Changed from root cause building as root...WHA? + user ls[:user] # Changed from root cause building as root...WHA? command "make clean && make VERSION=#{source_version} jar" action :run creates "#{ls[:instance_dir]}/source/build/logstash-#{source_version}--monolithic.jar" diff --git a/providers/service.rb b/providers/service.rb index 77cc41a..e83fbfe 100644 --- a/providers/service.rb +++ b/providers/service.rb @@ -207,7 +207,7 @@ def load_current_resource def default_args svc = svc_vars - args = ['agent', '-f', "#{svc[:home]}/etc/conf.d/"] + args = ['-f', "#{svc[:home]}/etc/conf.d/"] args.concat ['-vv'] if svc[:debug] args.concat ['-l', svc[:log_file]] if svc[:log_file] args.concat ['-w', svc[:workers].to_s] if svc[:workers] diff --git a/test/unit/spec/spec_helper.rb b/test/unit/spec/spec_helper.rb index 875f3fb..ea73e04 100644 --- a/test/unit/spec/spec_helper.rb +++ b/test/unit/spec/spec_helper.rb @@ -16,7 +16,7 @@ ::UBUNTU_OPTS = { platform: 'ubuntu', - version: '12.04', + version: '16.04', log_level: ::LOG_LEVEL } diff --git a/test/unit/spec/util_spec.rb b/test/unit/spec/util_spec.rb index 0107345..9ae0408 100644 --- a/test/unit/spec/util_spec.rb +++ b/test/unit/spec/util_spec.rb @@ -3,9 +3,9 @@ describe '::determine_platform_major_version' do context 'with ubuntu' do - let(:node) { { 'platform' => 'ubuntu', 'platform_version' => '12.04' } } + let(:node) { { 'platform' => 'ubuntu', 'platform_version' => '16.04' } } it 'returns full version' do - expect(Logstash.determine_platform_major_version(node)).to eql(12.04) + expect(Logstash.determine_platform_major_version(node)).to eql(16.04) end end @@ -33,7 +33,7 @@ end end context 'after user' do - let(:node) { { 'platform' => 'ubuntu', 'platform_version' => '12.04' } } + let(:node) { { 'platform' => 'ubuntu', 'platform_version' => '16.04' } } it 'returns true' do expect(Logstash.upstart_supports_user?(node)).to eql(true) end