diff --git a/README.md b/README.md index 04889f6..9312586 100644 --- a/README.md +++ b/README.md @@ -58,11 +58,12 @@ end #### Properties - `source` - Path to network accessible IBM MQ installation package. - `accept_license` - Set this to `true` if you accept the terms of the IBM MQ license. -- `primary` - Set this to `true` to make this the primary MQ installation. Currently not supported to set this to `false`. -- `packages` - An array of package names to install. Defaults to: +- `primary` - Set this to `true` to make this the primary MQ installation. Currently not supported to set this to `false`. +- `packages` - An array of package names to install. Defaults to: `%w(MQSeriesServer MQSeriesGSKit)` - `uid` - The UID to use for the `mqm` user - `gid` - The GID to use for the `mqm` user +- `fixpack` - Set this to `true` to have MQ fixpack installed. Note that fixpack should be installed in the same base packages installation. Defaults to: `nil` ## ibm_mq_queue_manager The `ibm_mq_queue_manager` resource creates and starts IBM MQ queue managers. diff --git a/resources/installation.rb b/resources/installation.rb index 8e216a0..d306ed8 100644 --- a/resources/installation.rb +++ b/resources/installation.rb @@ -18,6 +18,7 @@ property :primary, kind_of: [TrueClass, FalseClass], default: false property :uid, kind_of: [String, Integer], default: nil property :gid, kind_of: [String, Integer], default: nil +property :fixpack, kind_of: [TrueClass, FalseClass], default: nil default_action :create @@ -42,6 +43,11 @@ download_dir = "#{Chef::Config[:file_cache_path]}/ibm_mq" download_path = "#{download_dir}/#{name}.tar.gz" unpack_dir = "#{download_dir}/extract-#{name}" + if property_is_set?(:fixpack) + pkgs_dir = unpack_dir + else + pkgs_dir = "#{unpack_dir}/MQServer" + end directory download_dir do owner 'root' @@ -79,7 +85,7 @@ execute 'createrepo-mq' do user 'root' - cwd "#{unpack_dir}/MQServer" + cwd pkgs_dir command 'createrepo .' end @@ -125,7 +131,7 @@ # Add a local yum repository yum_repository "ibm-mq-chef-#{name}" do description 'Packages for IBM MQ, used by Chef cookbook' - baseurl "file://#{unpack_dir}/MQServer" + baseurl "file://#{pkgs_dir}" gpgcheck false action :create end diff --git a/test/cookbooks/ibm_mq_test/metadata.rb b/test/cookbooks/ibm_mq_test/metadata.rb index b732aa0..069714d 100644 --- a/test/cookbooks/ibm_mq_test/metadata.rb +++ b/test/cookbooks/ibm_mq_test/metadata.rb @@ -3,6 +3,6 @@ maintainer_email 'arthur.barr@uk.ibm.com' license 'Apache 2.0' description 'Tests for ibm_mq cookbook' -version '0.1.1' +version '0.2.1' depends 'ibm_mq' depends 'sysctl'