diff --git a/libraries/resource_configure.rb b/libraries/resource_configure.rb index 6fff0d672..fe20c1cad 100644 --- a/libraries/resource_configure.rb +++ b/libraries/resource_configure.rb @@ -8,6 +8,7 @@ class Resource::ElasticsearchConfigure < Resource include Poise actions(:manage, :remove) + default_action :manage attribute(:dir, kind_of: String, default: "/usr/local") diff --git a/libraries/resource_install.rb b/libraries/resource_install.rb index 6b71bcf61..eff3b0f97 100644 --- a/libraries/resource_install.rb +++ b/libraries/resource_install.rb @@ -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') diff --git a/libraries/resource_plugin.rb b/libraries/resource_plugin.rb index 462c8e5e1..7a1c5164f 100644 --- a/libraries/resource_plugin.rb +++ b/libraries/resource_plugin.rb @@ -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) diff --git a/libraries/resource_service.rb b/libraries/resource_service.rb index f0a1f4e26..57332db66 100644 --- a/libraries/resource_service.rb +++ b/libraries/resource_service.rb @@ -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 } ) diff --git a/libraries/resource_user.rb b/libraries/resource_user.rb index 2be9953fa..484d27c40 100644 --- a/libraries/resource_user.rb +++ b/libraries/resource_user.rb @@ -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)