summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-11-16 16:38:02 -0800
committerTim Smith <tsmith@chef.io>2018-11-16 16:38:02 -0800
commitf79e5f24488e59ce7c38b059e3a74af143d63e33 (patch)
tree1f7c198d50fc8c961d2b5cb5a9b3c9f5f19d7df4
parent8d775f39f480a3f64aa15207c400a78d3b12c9ec (diff)
downloadchef-f79e5f24488e59ce7c38b059e3a74af143d63e33.tar.gz
Allow Integers for all group / owner properties
We did for many of them, but not all. Many of these should get switched over to securable, but this is a solid first step to give a more consistent user experience. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/dmg_package.rb2
-rw-r--r--lib/chef/resource/homebrew_cask.rb2
-rw-r--r--lib/chef/resource/homebrew_tap.rb2
-rw-r--r--lib/chef/resource/link.rb2
-rw-r--r--lib/chef/resource/openssl_dhparam.rb4
-rw-r--r--lib/chef/resource/openssl_ec_private_key.rb4
-rw-r--r--lib/chef/resource/openssl_ec_public_key.rb4
-rw-r--r--lib/chef/resource/openssl_rsa_private_key.rb4
-rw-r--r--lib/chef/resource/openssl_rsa_public_key.rb4
-rw-r--r--lib/chef/resource/openssl_x509_certificate.rb4
-rw-r--r--lib/chef/resource/openssl_x509_crl.rb4
-rw-r--r--lib/chef/resource/openssl_x509_request.rb4
-rw-r--r--lib/chef/resource/ssh_known_hosts_entry.rb4
13 files changed, 22 insertions, 22 deletions
diff --git a/lib/chef/resource/dmg_package.rb b/lib/chef/resource/dmg_package.rb
index e6695ac5e3..29f38a6bf6 100644
--- a/lib/chef/resource/dmg_package.rb
+++ b/lib/chef/resource/dmg_package.rb
@@ -36,7 +36,7 @@ class Chef
property :file, String,
description: "The full path to the .dmg file on the local system."
- property :owner, String,
+ property :owner, [String, Integer],
description: "The user that should own the package installation."
property :destination, String,
diff --git a/lib/chef/resource/homebrew_cask.rb b/lib/chef/resource/homebrew_cask.rb
index 71b40c55bf..a22d73aace 100644
--- a/lib/chef/resource/homebrew_cask.rb
+++ b/lib/chef/resource/homebrew_cask.rb
@@ -48,7 +48,7 @@ class Chef
description: "The path to the homebrew binary.",
default: "/usr/local/bin/brew"
- property :owner, String,
+ property :owner, [String, Integer],
description: "The owner of the Homebrew installation.",
default: lazy { find_homebrew_username }
diff --git a/lib/chef/resource/homebrew_tap.rb b/lib/chef/resource/homebrew_tap.rb
index aff65685b7..ca6b322d7e 100644
--- a/lib/chef/resource/homebrew_tap.rb
+++ b/lib/chef/resource/homebrew_tap.rb
@@ -48,7 +48,7 @@ class Chef
description: "The path to the Homebrew binary.",
default: "/usr/local/bin/brew"
- property :owner, String,
+ property :owner, [String, Integer],
description: "The owner of the Homebrew installation.",
default: lazy { find_homebrew_username }
diff --git a/lib/chef/resource/link.rb b/lib/chef/resource/link.rb
index 45d1e3011a..f62209108c 100644
--- a/lib/chef/resource/link.rb
+++ b/lib/chef/resource/link.rb
@@ -60,7 +60,7 @@ class Chef
equal_to: [ :symbolic, :hard ], default: :symbolic
property :group, [String, Integer],
- description: "A string or ID that identifies the group associated with a symbolic link.",
+ description: "A group name or ID number that identifies the group associated with a symbolic link.",
regex: [Chef::Config[:group_valid_regex]]
property :owner, [String, Integer],
diff --git a/lib/chef/resource/openssl_dhparam.rb b/lib/chef/resource/openssl_dhparam.rb
index f2f3b679e4..445dd97bdc 100644
--- a/lib/chef/resource/openssl_dhparam.rb
+++ b/lib/chef/resource/openssl_dhparam.rb
@@ -45,10 +45,10 @@ class Chef
description: "The desired Diffie-Hellmann generator.",
default: 2
- property :owner, String,
+ property :owner, [String, Integer],
description: "The owner applied to all files created by the resource."
- property :group, String,
+ property :group, [String, Integer],
description: "The group ownership applied to all files created by the resource."
property :mode, [Integer, String],
diff --git a/lib/chef/resource/openssl_ec_private_key.rb b/lib/chef/resource/openssl_ec_private_key.rb
index cc7ce2702b..06fec2939b 100644
--- a/lib/chef/resource/openssl_ec_private_key.rb
+++ b/lib/chef/resource/openssl_ec_private_key.rb
@@ -47,10 +47,10 @@ class Chef
description: "The designed cipher to use when generating your key. Run `openssl list-cipher-algorithms` to see available options.",
default: "des3"
- property :owner, String,
+ property :owner, [String, Integer],
description: "The owner applied to all files created by the resource."
- property :group, String,
+ property :group, [String, Integer],
description: "The group ownership applied to all files created by the resource."
property :mode, [Integer, String],
diff --git a/lib/chef/resource/openssl_ec_public_key.rb b/lib/chef/resource/openssl_ec_public_key.rb
index 33f6070d93..fad7fd9713 100644
--- a/lib/chef/resource/openssl_ec_public_key.rb
+++ b/lib/chef/resource/openssl_ec_public_key.rb
@@ -42,10 +42,10 @@ class Chef
property :private_key_pass, String,
description: "The passphrase of the provided private key."
- property :owner, String,
+ property :owner, [String, Integer],
description: "The owner applied to all files created by the resource."
- property :group, String,
+ property :group, [String, Integer],
description: "The group ownership applied to all files created by the resource."
property :mode, [Integer, String],
diff --git a/lib/chef/resource/openssl_rsa_private_key.rb b/lib/chef/resource/openssl_rsa_private_key.rb
index 52ec5bb9e1..fb19e8ff99 100644
--- a/lib/chef/resource/openssl_rsa_private_key.rb
+++ b/lib/chef/resource/openssl_rsa_private_key.rb
@@ -49,10 +49,10 @@ class Chef
description: "The designed cipher to use when generating your key. Run `openssl list-cipher-algorithms` to see available options.",
default: "des3"
- property :owner, String,
+ property :owner, [String, Integer],
description: "The owner applied to all files created by the resource."
- property :group, String,
+ property :group, [String, Integer],
description: "The group ownership applied to all files created by the resource."
property :mode, [Integer, String],
diff --git a/lib/chef/resource/openssl_rsa_public_key.rb b/lib/chef/resource/openssl_rsa_public_key.rb
index eb73f22dae..be7f25030f 100644
--- a/lib/chef/resource/openssl_rsa_public_key.rb
+++ b/lib/chef/resource/openssl_rsa_public_key.rb
@@ -42,10 +42,10 @@ class Chef
property :private_key_pass, String,
description: "The passphrase of the provided private key."
- property :owner, String,
+ property :owner, [String, Integer],
description: "The owner applied to all files created by the resource."
- property :group, String,
+ property :group, [String, Integer],
description: "The group ownership applied to all files created by the resource."
property :mode, [Integer, String],
diff --git a/lib/chef/resource/openssl_x509_certificate.rb b/lib/chef/resource/openssl_x509_certificate.rb
index 1b7ade0a7a..71a1f8d6d7 100644
--- a/lib/chef/resource/openssl_x509_certificate.rb
+++ b/lib/chef/resource/openssl_x509_certificate.rb
@@ -34,10 +34,10 @@ class Chef
description: "An optional property for specifying the path to write the file to if it differs from the resource block's name.",
name_property: true
- property :owner, String,
+ property :owner, [String, Integer],
description: "The owner applied to all files created by the resource."
- property :group, String,
+ property :group, [String, Integer],
description: "The group ownership applied to all files created by the resource."
property :expire, Integer,
diff --git a/lib/chef/resource/openssl_x509_crl.rb b/lib/chef/resource/openssl_x509_crl.rb
index f012cfc8d2..c6a2918320 100644
--- a/lib/chef/resource/openssl_x509_crl.rb
+++ b/lib/chef/resource/openssl_x509_crl.rb
@@ -59,10 +59,10 @@ class Chef
property :ca_key_pass, String,
description: "The passphrase for CA private key's passphrase."
- property :owner, String,
+ property :owner, [String, Integer],
description: "The owner permission for the CRL file."
- property :group, String,
+ property :group, [String, Integer],
description: "The group permission for the CRL file."
property :mode, [Integer, String],
diff --git a/lib/chef/resource/openssl_x509_request.rb b/lib/chef/resource/openssl_x509_request.rb
index 7708bbe999..6e5e182f31 100644
--- a/lib/chef/resource/openssl_x509_request.rb
+++ b/lib/chef/resource/openssl_x509_request.rb
@@ -32,10 +32,10 @@ class Chef
property :path, String, name_property: true,
description: "An optional property for specifying the path to write the file to if it differs from the resource block's name."
- property :owner, String,
+ property :owner, [String, Integer],
description: "The owner applied to all files created by the resource."
- property :group, String,
+ property :group, [String, Integer],
description: "The group ownership applied to all files created by the resource."
property :mode, [Integer, String],
diff --git a/lib/chef/resource/ssh_known_hosts_entry.rb b/lib/chef/resource/ssh_known_hosts_entry.rb
index 5685a069a7..167ac959e8 100644
--- a/lib/chef/resource/ssh_known_hosts_entry.rb
+++ b/lib/chef/resource/ssh_known_hosts_entry.rb
@@ -50,11 +50,11 @@ class Chef
description: "The file mode for the ssh_known_hosts file.",
default: "0644"
- property :owner, String,
+ property :owner, [String, Integer],
description: "The file owner for the ssh_known_hosts file.",
default: "root"
- property :group, String,
+ property :group, [String, Integer],
description: "The file group for the ssh_known_hosts file.",
default: lazy { node["root_group"] }