Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing issue where we don't supply the updated passwords #52

Merged
merged 2 commits into from Nov 1, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We (Riot) should manage the bumping of the version number.


%w{ ubuntu centos }.each do |os|
supports os
Expand Down
10 changes: 9 additions & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down