Skip to content

Instantly share code, notes, and snippets.

@ericcholis
Created July 31, 2013 16:02
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericcholis/6123367 to your computer and use it in GitHub Desktop.
Save ericcholis/6123367 to your computer and use it in GitHub Desktop.
Puppet Open SSL Self Signed Certificate
$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"
}
@JasonMortonNZ
Copy link

How do you use this snippet? Do I just add the content to a file name openssl.pp and put it in my manifests folder?

@intrepidws
Copy link

Yes, I'm wondering this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment