summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2021-02-04 15:53:28 -0800
committerTim Smith <tsmith84@gmail.com>2021-02-04 15:53:28 -0800
commit0a17447b74656f1256e833b2f9c14991a5480c0f (patch)
treea7807e7659f37174f905c76351a7893167dad26e /lib/chef
parentedd9915cc0adebf84e76b2971035e48f2d2f946a (diff)
downloadchef-0a17447b74656f1256e833b2f9c14991a5480c0f.tar.gz
Move action description updates
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/resource/timezone.rb2
-rw-r--r--lib/chef/resource/user_ulimit.rb4
-rw-r--r--lib/chef/resource/windows_audit_policy.rb2
-rw-r--r--lib/chef/resource/windows_auto_run.rb2
-rw-r--r--lib/chef/resource/windows_certificate.rb9
-rw-r--r--lib/chef/resource/windows_dfs_folder.rb8
-rw-r--r--lib/chef/resource/windows_dfs_namespace.rb8
-rw-r--r--lib/chef/resource/windows_dfs_server.rb4
-rw-r--r--lib/chef/resource/windows_dns_record.rb8
-rw-r--r--lib/chef/resource/windows_dns_zone.rb8
10 files changed, 17 insertions, 38 deletions
diff --git a/lib/chef/resource/timezone.rb b/lib/chef/resource/timezone.rb
index ebb05a5df8..584c2437c7 100644
--- a/lib/chef/resource/timezone.rb
+++ b/lib/chef/resource/timezone.rb
@@ -119,7 +119,7 @@ class Chef
end
end
- action :set, description: "Set the timezone" do
+ action :set, description: "Set the system timezone" do
# we have to check windows first since the value isn't case sensitive here
if windows?
unless current_windows_tz.casecmp?(new_resource.timezone)
diff --git a/lib/chef/resource/user_ulimit.rb b/lib/chef/resource/user_ulimit.rb
index d138eeabf3..8679161693 100644
--- a/lib/chef/resource/user_ulimit.rb
+++ b/lib/chef/resource/user_ulimit.rb
@@ -78,7 +78,7 @@ class Chef
coerce: proc { |m| m.end_with?(".conf") ? m : m + ".conf" },
default: lazy { |r| r.username == "*" ? "00_all_limits.conf" : "#{r.username}_limits.conf" }
- action :create do
+ action :create, description: "Create a ulimit configuration file" do
template "/etc/security/limits.d/#{new_resource.filename}" do
source ::File.expand_path("support/ulimit.erb", __dir__)
local true
@@ -106,7 +106,7 @@ class Chef
end
end
- action :delete do
+ action :delete, description: "Delete an existing ulimit configuration file" do
file "/etc/security/limits.d/#{new_resource.filename}" do
action :delete
end
diff --git a/lib/chef/resource/windows_audit_policy.rb b/lib/chef/resource/windows_audit_policy.rb
index 433e18e197..922a4eaf66 100644
--- a/lib/chef/resource/windows_audit_policy.rb
+++ b/lib/chef/resource/windows_audit_policy.rb
@@ -152,7 +152,7 @@ class Chef
property :audit_base_directories, [true, false],
description: "Setting this audit policy option to true will force the system to assign a System Access Control List to named objects to enable auditing of container objects such as directories."
- action :set do
+ action :set, description: "Configure an audit policy" do
unless new_resource.subcategory.nil?
new_resource.subcategory.each do |subcategory|
next if subcategory_configured?(subcategory, new_resource.success, new_resource.failure)
diff --git a/lib/chef/resource/windows_auto_run.rb b/lib/chef/resource/windows_auto_run.rb
index 5e9e42d0a0..4d3f7cdcaa 100644
--- a/lib/chef/resource/windows_auto_run.rb
+++ b/lib/chef/resource/windows_auto_run.rb
@@ -72,7 +72,7 @@ class Chef
end
end
- action :remove, description: "Remove an item that was previously setup to run at login" do
+ action :remove, description: "Remove an item that was previously configured to run at login" do
registry_key registry_path do
values [{
name: new_resource.program_name,
diff --git a/lib/chef/resource/windows_certificate.rb b/lib/chef/resource/windows_certificate.rb
index 84dbc06bed..6d0e080b3f 100644
--- a/lib/chef/resource/windows_certificate.rb
+++ b/lib/chef/resource/windows_certificate.rb
@@ -92,9 +92,7 @@ class Chef
default: false,
introduced: "16.8"
- action :create do
- description "Creates or updates a certificate."
-
+ action :create, description: "Creates or updates a certificate" do
# Extension of the certificate
ext = ::File.extname(new_resource.source)
@@ -103,8 +101,7 @@ class Chef
end
# acl_add is a modify-if-exists operation : not idempotent
- action :acl_add do
- description "Adds read-only entries to a certificate's private key ACL."
+ action :acl_add, description: "Adds read-only entries to a certificate's private key ACL" do
if ::File.exist?(new_resource.source)
hash = "$cert.GetCertHashString()"
@@ -147,7 +144,7 @@ class Chef
end
end
- action :verify, description: "Verifies a certicate and logs the result" do
+ action :verify, description: "Verifies a certificate and logs the result" do
out = verify_cert
if !!out == out
out = out ? "Certificate is valid" : "Certificate not valid"
diff --git a/lib/chef/resource/windows_dfs_folder.rb b/lib/chef/resource/windows_dfs_folder.rb
index 31f6814bcf..9d81255dea 100644
--- a/lib/chef/resource/windows_dfs_folder.rb
+++ b/lib/chef/resource/windows_dfs_folder.rb
@@ -42,9 +42,7 @@ class Chef
property :description, String,
description: "Description for the share."
- action :create do
- description "Creates the folder in dfs namespace."
-
+ action :create, description: "Creates the folder in dfs namespace" do
raise "target_path is required for install" unless property_is_set?(:target_path)
raise "description is required for install" unless property_is_set?(:description)
@@ -62,9 +60,7 @@ class Chef
end
end
- action :delete do
- description "Deletes the folder in the dfs namespace."
-
+ action :delete, description: "Deletes the folder in the dfs namespace" do
powershell_script "Delete DFS Namespace" do
code <<-EOH
Remove-DfsnFolder -Path '\\\\#{ENV["COMPUTERNAME"]}\\#{new_resource.namespace_name}\\#{new_resource.folder_path}' -Force
diff --git a/lib/chef/resource/windows_dfs_namespace.rb b/lib/chef/resource/windows_dfs_namespace.rb
index ddd8a0ee26..a0e2ed20fc 100644
--- a/lib/chef/resource/windows_dfs_namespace.rb
+++ b/lib/chef/resource/windows_dfs_namespace.rb
@@ -52,9 +52,7 @@ class Chef
description: "The root from which to create the DFS tree. Defaults to C:\\DFSRoots.",
default: 'C:\\DFSRoots'
- action :create do
- description "Creates the dfs namespace on the server."
-
+ action :create, description: "Creates the dfs namespace on the server" do
directory file_path do
action :create
recursive true
@@ -84,9 +82,7 @@ class Chef
end
end
- action :delete do
- description "Deletes a DFS Namespace including the directory on disk."
-
+ action :delete, description: "Deletes a DFS Namespace including the directory on disk" do
powershell_script "Delete DFS Namespace" do
code <<-EOH
Remove-DfsnRoot -Path '\\\\#{ENV["COMPUTERNAME"]}\\#{new_resource.namespace_name}' -Force
diff --git a/lib/chef/resource/windows_dfs_server.rb b/lib/chef/resource/windows_dfs_server.rb
index fc161f8189..e93185c245 100644
--- a/lib/chef/resource/windows_dfs_server.rb
+++ b/lib/chef/resource/windows_dfs_server.rb
@@ -65,9 +65,7 @@ class Chef
sync_interval_secs results["SyncIntervalSec"]
end
- action :configure do
- description "Configure DFS settings."
-
+ action :configure, description: "Configure DFS settings" do
converge_if_changed do
dfs_cmd = "Set-DfsnServerConfiguration -ComputerName '#{ENV["COMPUTERNAME"]}' -UseFqdn $#{new_resource.use_fqdn} -LdapTimeoutSec #{new_resource.ldap_timeout_secs} -SyncIntervalSec #{new_resource.sync_interval_secs}"
dfs_cmd << " -EnableSiteCostedReferrals $#{new_resource.enable_site_costed_referrals}" if new_resource.enable_site_costed_referrals != current_resource.enable_site_costed_referrals
diff --git a/lib/chef/resource/windows_dns_record.rb b/lib/chef/resource/windows_dns_record.rb
index 329e1a3857..f68412aee6 100644
--- a/lib/chef/resource/windows_dns_record.rb
+++ b/lib/chef/resource/windows_dns_record.rb
@@ -49,9 +49,7 @@ class Chef
default: "localhost",
introduced: "16.3"
- action :create do
- description "Creates and updates the DNS entry."
-
+ action :create, description: "Creates and updates the DNS entry" do
windows_feature "RSAT-DNS-Server" do
not_if new_resource.dns_server.casecmp?("localhost")
end
@@ -61,9 +59,7 @@ class Chef
run_dsc_resource "Present"
end
- action :delete do
- description "Deletes a DNS entry."
-
+ action :delete, description: "Deletes a DNS entry" do
windows_feature "RSAT-DNS-Server" do
not_if new_resource.dns_server.casecmp?("localhost")
end
diff --git a/lib/chef/resource/windows_dns_zone.rb b/lib/chef/resource/windows_dns_zone.rb
index 09555c880c..91a4a22147 100644
--- a/lib/chef/resource/windows_dns_zone.rb
+++ b/lib/chef/resource/windows_dns_zone.rb
@@ -40,17 +40,13 @@ class Chef
description: "The type of DNS server, Domain or Standalone.",
default: "Domain", equal_to: %w{Domain Standalone}
- action :create do
- description "Creates and updates a DNS Zone."
-
+ action :create, description: "Creates and updates a DNS Zone" do
powershell_package "xDnsServer"
run_dsc_resource "Present"
end
- action :delete do
- description "Deletes a DNS Zone."
-
+ action :delete, description: "Deletes a DNS Zone" do
powershell_package "xDnsServer"
run_dsc_resource "Absent"