From 04e483cb5fa0c6068c1179a0a3e3e64eb5235881 Mon Sep 17 00:00:00 2001 From: Josh Mahowald Date: Thu, 31 Oct 2013 10:46:57 -0700 Subject: [PATCH 1/2] fixing issue where we don't supply the updated passwords --- metadata.rb | 2 +- recipes/default.rb | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/metadata.rb b/metadata.rb index 6e278a2..3edc671 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ license "Apache 2.0" description "Installs/Configures nexus" long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version "2.2.0" +version "2.2.1" %w{ ubuntu centos }.each do |os| supports os diff --git a/recipes/default.rb b/recipes/default.rb index bb39651..9e8bf72 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -25,9 +25,17 @@ default_credentials = data_bag_item["default_admin"] updated_credentials = data_bag_item["updated_admin"] +#need to extract out the password before going onto the next step +#to prevent a compiliation error when the updated credentials aren't supplied +if(!updated_credentials) + updated_password = default_credentials["password"] +else + updated_password = updated_credentials["password"] +end + nexus_user "admin" do old_password default_credentials["password"] - password updated_credentials["password"] + password updated_password action :change_password notifies :create, "ruby_block[set flag that default admin credentials were changed]", :immediately only_if { updated_credentials } From 69531a0169dc7ddf628363b3116ced4de228efbd Mon Sep 17 00:00:00 2001 From: Josh Mahowald Date: Thu, 31 Oct 2013 13:53:36 -0700 Subject: [PATCH 2/2] Bumping version back down so that merge happens cleanly --- metadata.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index 3edc671..6e278a2 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ license "Apache 2.0" description "Installs/Configures nexus" long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version "2.2.1" +version "2.2.0" %w{ ubuntu centos }.each do |os| supports os