diff --git a/CHANGELOG.md b/CHANGELOG.md index 862f9adc..f2b8954e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## v1.3.0: +* Change : Drop support for older Chef client versions. Chef client 16+ required. +* Change : Add support for Chef-client 18 +* Change : Use localhost address for admin port availability polling instead of `node['ipaddress']` + ## v1.2.8: * Fix : Add asadmin execution rights to `node['glassfish']['user']` and `node['glassfish']['group']` diff --git a/libraries/asadmin.rb b/libraries/asadmin.rb index 68477afa..85cae3e8 100644 --- a/libraries/asadmin.rb +++ b/libraries/asadmin.rb @@ -64,27 +64,23 @@ def transform_jvm_options(options, withoutversions = false) end end - def self.pipe_filter(node, pattern, regexp: true, line: false) - case node['os'] - when 'linux' - switches = [ - regexp ? '' : '-F', - line ? '-x' : '', - ] - "grep #{switches.join(' ')} -- '#{pattern}'" - when 'windows' + def pipe_filter(pattern, test = nil, regexp: true, line: false) + Chef::Log.info pattern.inspect + if platform_family? 'windows' switches = [ regexp ? '/R' : '/L', line ? '/X' : '', ] "findstr #{switches.join(' ')} \"#{pattern}\"" + else + switches = [ + regexp ? '' : '-F', + line ? '-x' : '', + ] + "grep #{switches.join(' ')} -- '#{pattern}'" end end - def pipe_filter(pattern, regexp: true, line: false) - Asadmin.pipe_filter(node, pattern, regexp: regexp, line: line) - end - def asadmin_command(command, remote_command = true, params = {}) options = {} options[:remote_command] = remote_command diff --git a/metadata.rb b/metadata.rb index 3a264b92..28f32d6b 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,8 +3,8 @@ maintainer_email 'peter@realityforge.org' license 'Apache-2.0' description 'Installs/Configures GlassFish Application Server' -version '1.2.8' -chef_version '>= 13.0' +version '1.3.0' +chef_version '>= 16.0' issues_url 'https://github.com/realityforge/chef-glassfish' source_url 'https://github.com/realityforge/chef-glassfish' diff --git a/resources/wait_for_glassfish.rb b/resources/wait_for_glassfish.rb index 6bc21c22..49213774 100644 --- a/resources/wait_for_glassfish.rb +++ b/resources/wait_for_glassfish.rb @@ -21,7 +21,7 @@ property :password_file, String, required: true # <> @attribute ipaddress The IP address to connect to glassfish. -property :ipaddress, String, default: lazy { node['ipaddress'] } +property :ipaddress, String, default: '127.0.0.1' # <> @attribute admin_port The port on which the web management console is bound. property :admin_port, Integer, default: 4848