Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Using the new default_action method

  • Loading branch information...
commit 72f445198b277b1b6d1aff198c227a881a1aa426 1 parent bde19e9
@gerhard gerhard authored
Showing with 2 additions and 10 deletions.
  1. +1 −5 resources/logrotate.rb
  2. +1 −5 resources/system_user.rb
View
6 resources/logrotate.rb
@@ -1,5 +1,6 @@
# http://linuxcommand.org/man_pages/logrotate8.html
actions :create, :delete
+default_action :create
attribute :service, :kind_of => String, :name_attribute => true
attribute :path, :kind_of => String
@@ -14,8 +15,3 @@
attribute :sharedscripts, :kind_of => [TrueClass, FalseClass], :default => false
attribute :prerotate, :kind_of => String
attribute :postrotate, :kind_of => String
-
-def initialize(*args)
- super
- @action = :create
-end
View
6 resources/system_user.rb
@@ -1,4 +1,5 @@
actions :create, :disable, :delete, :ignore
+default_action :create
attribute :username, :kind_of => String, :name_attribute => true
attribute :password, :kind_of => String, :default => ''
@@ -15,8 +16,3 @@
attribute :profile, :kind_of => Array, :default => []
attribute :git, :kind_of => Hash
attribute :known_hosts, :kind_of => Array, :default => []
-
-def initialize(*args)
- super
- @action = :create
-end
Please sign in to comment.
Something went wrong with that request. Please try again.