summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-07-25 10:59:51 -0700
committerTim Smith <tsmith@chef.io>2018-07-25 10:59:51 -0700
commit86f5d787952506e609740fa74c0bb322e5acb4bd (patch)
treed6d71dc4f5d33088d7c43711df1daec2af3d119b
parent77f21e4284b04d27b972589e6fed071d1f516733 (diff)
downloadchef-86f5d787952506e609740fa74c0bb322e5acb4bd.tar.gz
Add descriptions to the execute resource
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/execute.rb51
1 files changed, 38 insertions, 13 deletions
diff --git a/lib/chef/resource/execute.rb b/lib/chef/resource/execute.rb
index dfccfeb138..d1f7eaf729 100644
--- a/lib/chef/resource/execute.rb
+++ b/lib/chef/resource/execute.rb
@@ -55,28 +55,53 @@ class Chef
kind_of: [ String, Array ]
)
end
- property :umask, [ String, Integer ]
- property :creates, String
- property :cwd, String
- property :environment, Hash
+ property :umask, [ String, Integer ],
+ description: "The file mode creation mask, or umask."
+
+ property :creates, String,
+ description: "Prevent a command from creating a file when that file already exists."
+
+ property :cwd, String,
+ description: "Set the current working directory before running a command."
+
+ property :environment, Hash,
+ description: "Specify a Hash of environment variables to be set."
alias :env :environment
- property :group, [ String, Integer ]
- property :live_stream, [ TrueClass, FalseClass ], default: false
+ property :group, [ String, Integer ],
+ description: "The group name or group ID that must be changed before running a command."
+
+ property :live_stream, [ TrueClass, FalseClass ], default: false,
+ description: "Send the output of the command run by this execute resource block to the chef-client event stream."
+
# default_env defaults to `false` so that the command execution more exactly matches what the user gets on the command line without magic
property :default_env, [ TrueClass, FalseClass ], desired_state: false, default: false,
- description: "When true this enables ENV magic to add path_sanity to the PATH and force the locale to English+UTF-8 for parsing output"
- property :returns, [ Integer, Array ], default: 0
- property :timeout, [ Integer, Float ]
- property :user, [ String, Integer ]
- property :domain, String
- property :password, String, sensitive: true
+ introduced: "14.2",
+ description: "When true this enables ENV magic to add path_sanity to the PATH and force the locale to English+UTF-8 for parsing output"
+
+ property :returns, [ Integer, Array ], default: 0,
+ description: "The return value for a command. This may be an array of accepted values. An exception is raised when the return value(s) do not match."
+
+ property :timeout, [ Integer, Float ],
+ description: "The amount of time (in seconds) a command is to wait before timing out."
+
+ property :user, [ String, Integer ],
+ description: "The user name of the user identity with which to launch the new process. Default value: nil. The user name may optionally be specifed with a domain, i.e. domainuser or user@my.dns.domain.com via Universal Principal Name (UPN)format. It can also be specified without a domain simply as user if the domain is instead specified using the domain attribute. On Windows only, if this property is specified, the password property must be specified."
+
+ property :domain, String,
+ introduced: "12.21",
+ description: "Windows only: The domain of the user user specified by the user property. Default value: nil. If not specified, the user name and password specified by the user and password properties will be used to resolve that user against the domain in which the system running Chef client is joined, or if that system is not joined to a domain it will resolve the user as a local account on that system. An alternative way to specify the domain is to leave this property unspecified and specify the domain as part of the user property."
+
+ property :password, String, sensitive: true,
+ introduced: "12.21",
+ description: "Windows only: The password of the user specified by the user property. Default value: nil. This property is mandatory if user is specified on Windows and may only be specified if user is specified. The sensitive property for this resource will automatically be set to true if password is specified."
# lazy used to set default value of sensitive to true if password is set
property :sensitive, [ TrueClass, FalseClass ], default: lazy { |r| r.password ? true : false }
- property :elevated, [ TrueClass, FalseClass ], default: false
+ property :elevated, [ TrueClass, FalseClass ], default: false,
+ introduced: "13.3"
def self.set_guard_inherited_attributes(*inherited_attributes)
@class_inherited_attributes = inherited_attributes