diff options
author | Tim Smith <tsmith@chef.io> | 2018-07-30 16:58:37 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-08-14 11:23:59 -0700 |
commit | b9a1f16e85fd5fee48f7e03799828046251b6dc5 (patch) | |
tree | 89e85d0d06aa5d230ff80d4d1893414811cfe383 | |
parent | 49fd808d7e290a72de1d45c258fde78acf8782d8 (diff) | |
download | chef-b9a1f16e85fd5fee48f7e03799828046251b6dc5.tar.gz |
Remove declare_resource usage
We don't need this with custom resources
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/chef/resource/openssl_dhparam.rb | 2 | ||||
-rw-r--r-- | lib/chef/resource/openssl_rsa_private_key.rb | 2 | ||||
-rw-r--r-- | lib/chef/resource/openssl_rsa_public_key.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/resource/openssl_dhparam.rb b/lib/chef/resource/openssl_dhparam.rb index b7bc8438f2..a1fa3af7e4 100644 --- a/lib/chef/resource/openssl_dhparam.rb +++ b/lib/chef/resource/openssl_dhparam.rb @@ -65,7 +65,7 @@ class Chef converge_by("Create a dhparam file #{new_resource.path}") do dhparam_content = gen_dhparam(new_resource.key_length, new_resource.generator).to_pem - declare_resource(:file, new_resource.path) do + file new_resource.path do action :create owner new_resource.owner unless new_resource.owner.nil? group new_resource.group unless new_resource.group.nil? diff --git a/lib/chef/resource/openssl_rsa_private_key.rb b/lib/chef/resource/openssl_rsa_private_key.rb index 1bc8f73f47..84964dc8a7 100644 --- a/lib/chef/resource/openssl_rsa_private_key.rb +++ b/lib/chef/resource/openssl_rsa_private_key.rb @@ -80,7 +80,7 @@ class Chef rsa_key_content = gen_rsa_priv_key(new_resource.key_length).to_pem end - declare_resource(:file, new_resource.path) do + file new_resource.path do action :create owner new_resource.owner unless new_resource.owner.nil? group new_resource.group unless new_resource.group.nil? diff --git a/lib/chef/resource/openssl_rsa_public_key.rb b/lib/chef/resource/openssl_rsa_public_key.rb index fa00404999..978bc1b678 100644 --- a/lib/chef/resource/openssl_rsa_public_key.rb +++ b/lib/chef/resource/openssl_rsa_public_key.rb @@ -61,7 +61,7 @@ class Chef rsa_key_content = gen_rsa_pub_key((new_resource.private_key_path || new_resource.private_key_content), new_resource.private_key_pass) - declare_resource(:file, new_resource.path) do + file new_resource.path do action :create owner new_resource.owner unless new_resource.owner.nil? group new_resource.group unless new_resource.group.nil? |