Created
July 31, 2013 16:02
-
-
Save ericcholis/6123367 to your computer and use it in GitHub Desktop.
Puppet Open SSL Self Signed Certificate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$location = "Mountain View" | |
$country = "US" | |
$state = "CA" | |
$organization = "Google" | |
$unit = "Search" | |
$commonname = "www.example.com" | |
$keyname = "www_example_com" | |
$subject = "/C=${country}/ST=${state}/L=${location}/O=${organization}/OU=${unit}/CN=${commonname}" | |
$createcertificate = "openssl req -new -newkey rsa:2048 -x509 -days 365 -nodes -out ${keyname}.crt -keyout ${keyname}.key -subj \"${subject}\"" | |
exec { "openssl-csr": | |
command => $createcertificate, | |
cwd => '/home/vagrant', | |
creates => "/home/vagrant/${keyname}.key" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, I'm wondering this as well.