diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-02-03 19:46:09 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-02-05 09:10:47 -0800 |
commit | 2d68bd08d27a7549e293e432766bbb139a56d4d2 (patch) | |
tree | fae1f7aae0935480667d55919302b033d2e10468 /chef-utils | |
parent | 3748ef92205371435c3c2c33c2f0492905f3a8e4 (diff) | |
download | chef-2d68bd08d27a7549e293e432766bbb139a56d4d2.tar.gz |
More yard for chef-utils
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'chef-utils')
-rw-r--r-- | chef-utils/lib/chef-utils/dsl/platform.rb | 6 | ||||
-rw-r--r-- | chef-utils/lib/chef-utils/dsl/platform_family.rb | 6 | ||||
-rw-r--r-- | chef-utils/lib/chef-utils/dsl/service.rb | 8 |
3 files changed, 14 insertions, 6 deletions
diff --git a/chef-utils/lib/chef-utils/dsl/platform.rb b/chef-utils/lib/chef-utils/dsl/platform.rb index 8ea486b268..8af405d51c 100644 --- a/chef-utils/lib/chef-utils/dsl/platform.rb +++ b/chef-utils/lib/chef-utils/dsl/platform.rb @@ -303,7 +303,7 @@ module ChefUtils node["platform"] == "dragonfly" end - # Determine if the current node is MacOS. + # Determine if the current node is macOS. # # @param [Chef::Node] node the node to check # @since 15.5 @@ -316,7 +316,7 @@ module ChefUtils # chef-sugar backcompat method alias_method :mac_os_x_platform?, :macos_platform? - # Determine if the current node is gentoo + # Determine if the current node is Gentoo. # # @param [Chef::Node] node the node to check # @since 15.5 @@ -327,7 +327,7 @@ module ChefUtils node["platform"] == "gentoo" end - # Determine if the current node is slackware. + # Determine if the current node is Slackware. # # @param [Chef::Node] node the node to check # @since 15.5 diff --git a/chef-utils/lib/chef-utils/dsl/platform_family.rb b/chef-utils/lib/chef-utils/dsl/platform_family.rb index f9bc4d299d..9d0c878cb7 100644 --- a/chef-utils/lib/chef-utils/dsl/platform_family.rb +++ b/chef-utils/lib/chef-utils/dsl/platform_family.rb @@ -98,7 +98,7 @@ module ChefUtils # chef-sugar backcompat method alias_method :el?, :rhel? - # Determine if the current node is a rhel6 compatible build (Red Hat, CentOS, Oracle or Scientific Linux) + # Determine if the current node is a rhel6 compatible build (Red Hat, CentOS, Oracle or Scientific Linux). # # @param [Chef::Node] node the node to check # @since 15.5 @@ -109,7 +109,7 @@ module ChefUtils node["platform_family"] == "rhel" && node["platform_version"].to_f >= 6.0 && node["platform_version"].to_f < 7.0 end - # Determine if the current node is a rhel7 compatible build (Red Hat, CentOS, Oracle or Scientific Linux) + # Determine if the current node is a rhel7 compatible build (Red Hat, CentOS, Oracle or Scientific Linux). # # @param [Chef::Node] node the node to check # @since 15.5 @@ -120,7 +120,7 @@ module ChefUtils node["platform_family"] == "rhel" && node["platform_version"].to_f >= 7.0 && node["platform_version"].to_f < 8.0 end - # Determine if the current node is a rhel8 compatible build (Red Hat, CentOS, Oracle or Scientific Linux) + # Determine if the current node is a rhel8 compatible build (Red Hat, CentOS, Oracle or Scientific Linux). # # @param [Chef::Node] node the node to check # @since 15.5 diff --git a/chef-utils/lib/chef-utils/dsl/service.rb b/chef-utils/lib/chef-utils/dsl/service.rb index be1ea0708e..567c0f4a33 100644 --- a/chef-utils/lib/chef-utils/dsl/service.rb +++ b/chef-utils/lib/chef-utils/dsl/service.rb @@ -76,6 +76,14 @@ module ChefUtils file_exist?("/sbin/chkconfig") end + # + # Returns if a particular service exists for a particular service init system. Init systems may be :initd, :upstart, :etc_rcd, :xinetd, and :systemd. Example: service_script_exist?(:systemd, 'ntpd') + # + # @param [Symbol] type The type of init system. :initd, :upstart, :xinetd, :etc_rcd, or :systemd + # @param [String] script The name of the service + # + # @return [Boolean] + # def service_script_exist?(type, script) case type when :initd |