summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2021-05-07 11:22:40 -0700
committerGitHub <noreply@github.com>2021-05-07 11:22:40 -0700
commit9ac6c483c216573a18964809276a0de176909e3c (patch)
treef1e46ed51616f19e491d7c7c3139887a85eb5f6d
parent5b4600b0c75b48641e4ce090a5cff7140c778958 (diff)
parent90146ed4f0d660cf514331a478fe59e1dde86d84 (diff)
downloadchef-9ac6c483c216573a18964809276a0de176909e3c.tar.gz
Merge pull request #11539 from chef/hostname
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--cspell.json1
-rw-r--r--kitchen-tests/cookbooks/end_to_end/recipes/windows.rb4
-rw-r--r--lib/chef/resource/hostname.rb6
3 files changed, 4 insertions, 7 deletions
diff --git a/cspell.json b/cspell.json
index 4f620ffdf9..84dbe1a786 100644
--- a/cspell.json
+++ b/cspell.json
@@ -286,7 +286,6 @@
"createhomedir",
"Createobject",
"creds",
- "Credentials",
"Cribbs",
"crlfile",
"crlnum",
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb b/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb
index 6e7ebf08a7..83cbe3da36 100644
--- a/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb
+++ b/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb
@@ -5,10 +5,6 @@
# Copyright:: Copyright (c) Chef Software Inc.
#
-# hostnames on windows cannot contain a '.'
-# hostname on windows requires a reboot
-# hostname "chef-bk-ci"
-
chef_sleep "2"
execute "dir"
diff --git a/lib/chef/resource/hostname.rb b/lib/chef/resource/hostname.rb
index 017a5d37a8..cf1ef54ad1 100644
--- a/lib/chef/resource/hostname.rb
+++ b/lib/chef/resource/hostname.rb
@@ -90,10 +90,12 @@ class Chef
default: true
property :domain_user, String,
- description: "The domain username with permissions to change the local hostname. Specified in the form of 'Domain\User'"
+ description: "The domain username with permissions to change the local hostname. Specified in the form of 'Domain\User'. (Windows hosts only)",
+ introduced: "17.1"
property :domain_password, String,
- description: "The password associated with the domain user account"
+ description: "The password associated with the domain user account. (Windows hosts only)",
+ introduced: "17.1"
action_class do
def append_replacing_matching_lines(path, regex, string)