diff --git a/CHANGELOG.md b/CHANGELOG.md index bd67323..27879ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,12 @@ -cookbook-example CHANGELOG -========================== +cookbook-minio CHANGELOG +=============== -This file is used to list changes made in each version of the example cookbook. +## 0.0.4 + + - David Vanhoucke + - [7854ac8] add ipaddress sync -0.0.1 ------ -- [your_name] - - COMMIT_REF Initial release of cookbook example +This file is used to list changes made in each version of the example cookbook. - - - Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown. diff --git a/resources/metadata.rb b/resources/metadata.rb index 1f6f754..0f4b396 100644 --- a/resources/metadata.rb +++ b/resources/metadata.rb @@ -4,4 +4,4 @@ license 'AGPLv3' description 'Installs/Configures Minio' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '0.0.3' +version '0.0.4' diff --git a/resources/providers/config.rb b/resources/providers/config.rb index 3558ba0..9e7a4b6 100644 --- a/resources/providers/config.rb +++ b/resources/providers/config.rb @@ -52,13 +52,15 @@ end end action :register do + ipaddress = new_resource.ipaddress + begin consul_servers = system('serf members -tag consul=ready | grep consul=ready &> /dev/null') if consul_servers and !node["minio"]["registered"] query = {} query["ID"] = "s3-#{node["hostname"]}" query["Name"] = "s3" - query["Address"] = "#{node["ipaddress"]}" + query["Address"] = ipaddress query["Port"] = node["minio"]["port"] json_query = Chef::JSONCompat.to_json(query) diff --git a/resources/resources/config.rb b/resources/resources/config.rb index 8d33662..30b5972 100644 --- a/resources/resources/config.rb +++ b/resources/resources/config.rb @@ -3,4 +3,6 @@ attribute :user, :kind_of => String, :default => "minio" attribute :group, :kind_of => String, :default => "minio" -attribute :port, :kind_of => Fixnum, :default => 9000 \ No newline at end of file +attribute :port, :kind_of => Fixnum, :default => 9000 + +attribute :ipaddress, :kind_of => String, :default => "127.0.0.1" \ No newline at end of file