Commit 2507c4aa authored by Tim Smith's avatar Tim Smith
Browse files

Remove more default_actions that aren't necessary



We don't need these
Signed-off-by: default avatarTim Smith <tsmith@chef.io>
parent 0ec70912
......@@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
include OpenSSLCookbook::Helpers
property :path, String, name_property: true
......@@ -24,8 +25,6 @@ property :owner, String
property :group, String
property :mode, [Integer, String], default: '0640'
default_action :create
action :create do
raise ArgumentError, "You cannot specify both 'private_key_path' and 'private_key_content' properties at the same time." if new_resource.private_key_path && new_resource.private_key_content
raise ArgumentError, "You must specify the private key with either 'private_key_path' or 'private_key_content' properties." unless new_resource.private_key_path || new_resource.private_key_content
......
......@@ -32,8 +32,6 @@ property :key_type, equal_to: %w(rsa ec), default: 'ec'
property :key_length, equal_to: [1024, 2048, 4096, 8192], default: 2048
property :key_curve, equal_to: %w(secp384r1 secp521r1 prime256v1), default: 'prime256v1'
default_action :create
action :create do
unless ::File.exist? new_resource.path
converge_by("Create CSR #{@new_resource}") do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment