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

set default resource actions #327

Merged
merged 2 commits into from
Jun 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
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
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