summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2021-08-13 13:56:58 -0700
committerTim Smith <tsmith84@gmail.com>2021-08-13 13:56:58 -0700
commit722657f52c346184030b47a5946e8b4a669a96b6 (patch)
treee549a24d16befb37f662983d37977bb83cff28b1
parent8e0f5c62040e8286bd3c7109af24dc327f1e7b87 (diff)
downloadchef-722657f52c346184030b47a5946e8b4a669a96b6.tar.gz
Add more descriptions
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/provider/yum_repository.rb6
-rw-r--r--lib/chef/provider/zypper_repository.rb6
-rw-r--r--lib/chef/resource/yum_package.rb6
3 files changed, 7 insertions, 11 deletions
diff --git a/lib/chef/provider/yum_repository.rb b/lib/chef/provider/yum_repository.rb
index 8269487bbd..a3d19e95d3 100644
--- a/lib/chef/provider/yum_repository.rb
+++ b/lib/chef/provider/yum_repository.rb
@@ -31,7 +31,7 @@ class Chef
def load_current_resource; end
- action :create do
+ action :create, description: "Create a repository based on the properties." do
template ::File.join(new_resource.reposdir, "#{new_resource.repositoryid}.repo") do
if template_available?(new_resource.source)
source new_resource.source
@@ -69,7 +69,7 @@ class Chef
end
end
- action :delete do
+ action :delete, description: "Remove a repository." do
# clean the repo cache first
execute "yum clean all #{new_resource.repositoryid}" do
command "yum clean all --disablerepo=* --enablerepo=#{new_resource.repositoryid}"
@@ -86,7 +86,7 @@ class Chef
end
end
- action :makecache do
+ action :makecache, description: "Force the creation of the repository cache. This is also done automatically when a repository is updated." do
execute "yum-makecache-#{new_resource.repositoryid}" do
command "yum -q -y makecache --disablerepo=* --enablerepo=#{new_resource.repositoryid}"
action :run
diff --git a/lib/chef/provider/zypper_repository.rb b/lib/chef/provider/zypper_repository.rb
index c1c863e20e..08e254b6b8 100644
--- a/lib/chef/provider/zypper_repository.rb
+++ b/lib/chef/provider/zypper_repository.rb
@@ -29,7 +29,7 @@ class Chef
def load_current_resource; end
- action :create do
+ action :create, description: "Add a new Zypper repository." do
if new_resource.gpgautoimportkeys
install_gpg_keys(new_resource.gpgkey)
else
@@ -50,13 +50,13 @@ class Chef
end
end
- action :delete do
+ action :delete, description: "Remove a Zypper repository." do
execute "zypper --quiet --non-interactive removerepo #{escaped_repo_name}" do
only_if "zypper --quiet lr #{escaped_repo_name}"
end
end
- action :refresh do
+ action :refresh, description: "Refresh Zypper repository." do
execute "zypper --quiet --non-interactive refresh --force #{escaped_repo_name}" do
only_if "zypper --quiet lr #{escaped_repo_name}"
end
diff --git a/lib/chef/resource/yum_package.rb b/lib/chef/resource/yum_package.rb
index 53e02bf609..c8446bf9b0 100644
--- a/lib/chef/resource/yum_package.rb
+++ b/lib/chef/resource/yum_package.rb
@@ -27,11 +27,7 @@ class Chef
provides :yum_package
provides :package, platform_family: "fedora_derived"
- description "Use the **yum_package** resource to install, upgrade, and remove packages with Yum"\
- " for the Red Hat and CentOS platforms. The yum_package resource is able to resolve"\
- " `provides` data for packages much like Yum can do when it is run from the command line."\
- " This allows a variety of options for installing packages, like minimum versions,"\
- " virtual provides, and library names."
+ description "Use the **yum_package** resource to install, upgrade, and remove packages with Yum for the Red Hat and CentOS platforms. The yum_package resource is able to resolve `provides` data for packages much like Yum can do when it is run from the command line. This allows a variety of options for installing packages, like minimum versions, virtual provides, and library names. Note: Support for using file names to install packages (as in `yum_package '/bin/sh'`) is not available because the volume of data required to parse for this is excessive."
examples <<~DOC
**Install an exact version**: