Skip to content

Commit

Permalink
Merge pull request #327 from nathwill/next
Browse files Browse the repository at this point in the history
set default resource actions
  • Loading branch information
martinb3 committed Jun 29, 2015
2 parents ad6f98a + 34fe1c1 commit 1d7b739
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions libraries/resource_configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class Resource::ElasticsearchConfigure < Resource
include Poise

actions(:manage, :remove)
default_action :manage

attribute(:dir, kind_of: String, default: "/usr/local")

Expand Down
2 changes: 2 additions & 0 deletions libraries/resource_install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class Resource::ElasticsearchInstall < Resource
provides :elasticsearch_install

actions(:install, :remove)
default_action :install

attribute(:type, kind_of: Symbol, :equal_to => [:source, :package], default: :source)
attribute(:version, kind_of: String, default: '1.5.0')

Expand Down
1 change: 1 addition & 0 deletions libraries/resource_plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class Resource::ElasticsearchPlugin < Resource
include ElasticsearchCookbook::Helpers

actions(:install, :remove)
default_action :install

# /usr/local/awesome/elasticsearch-version/plugins or packaged location
attribute(:plugin_dir, kind_of: String)
Expand Down
1 change: 1 addition & 0 deletions libraries/resource_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class Resource::ElasticsearchService < Resource
include Poise

actions(:configure, :remove)
default_action :configure

attribute(:service_name, kind_of: String, :name_attribute => true)
attribute(:node_name, kind_of: String, default: lazy { node.name } )
Expand Down
1 change: 1 addition & 0 deletions libraries/resource_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class Resource::ElasticsearchUser < Resource
include Poise

actions(:create, :remove)
default_action :create

attribute(:username, kind_of: String, default: lazy { name }) # default to resource name
attribute(:uid, kind_of: Integer)
Expand Down

0 comments on commit 1d7b739

Please sign in to comment.