diff options
author | Michael Scherer <misc@mageia.org> | 2012-03-19 22:17:16 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2012-03-19 22:17:16 +0000 |
commit | 3ad7ce0919c747e34ce612d26a4c103ebe58abad (patch) | |
tree | 52f29126ca430ee61b5af37dc9bbb3794858b7b9 /modules/openssl/manifests | |
parent | b201a7db8051b8c8a2a033b4163a5dd0ad1dda08 (diff) | |
download | puppet-3ad7ce0919c747e34ce612d26a4c103ebe58abad.tar puppet-3ad7ce0919c747e34ce612d26a4c103ebe58abad.tar.gz puppet-3ad7ce0919c747e34ce612d26a4c103ebe58abad.tar.bz2 puppet-3ad7ce0919c747e34ce612d26a4c103ebe58abad.tar.xz puppet-3ad7ce0919c747e34ce612d26a4c103ebe58abad.zip |
clean and reindent openssl module
Diffstat (limited to 'modules/openssl/manifests')
-rw-r--r-- | modules/openssl/manifests/init.pp | 57 |
1 files changed, 27 insertions, 30 deletions
diff --git a/modules/openssl/manifests/init.pp b/modules/openssl/manifests/init.pp index 9f5ec9bc..bf05d35e 100644 --- a/modules/openssl/manifests/init.pp +++ b/modules/openssl/manifests/init.pp @@ -1,43 +1,40 @@ class openssl { class base { - package { 'openssl': - ensure => installed - } - } + package { 'openssl': } + } define self_signed_cert($directory = '/etc/certs') { - include openssl::base + include openssl::base - $pem_file = "$name.pem" - exec { "openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout $pem_file -out $pem_file -subj '/CN=$name'": - cwd => "$directory", - creates => "$directory/$name.pem", - require => Package['openssl'] - } + $pem_file = "$name.pem" + exec { "openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout $pem_file -out $pem_file -subj '/CN=$name'": + cwd => $directory, + creates => "$directory/$name.pem", + require => Package['openssl'] + } } - define self_signed_splitted_cert($filename = '', - $directory = '/etc/certs', - $owner = "root", - $group = 'root', - $mode = '600') { - include openssl::base - - $crt_file = "$filename.crt" - $key_file = "$filename.key" - exec { "openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout $key_file -out $crt_file -subj '/CN=$name'": - cwd => "$directory", - creates => "$directory/$key_file", - require => Package['openssl'], - before => [ File["$directory/$key_file"], + define self_signed_splitted_cert( $filename = '', + $directory = '/etc/certs', + $owner = 'root', + $group = 'root', + $mode = '0600') { + include openssl::base + + $crt_file = "$filename.crt" + $key_file = "$filename.key" + exec { "openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout $key_file -out $crt_file -subj '/CN=$name'": + cwd => $directory, + creates => "$directory/$key_file", + require => Package['openssl'], + before => [File["$directory/$key_file"], File["$directory/$crt_file"]] - } + } - file { ["$directory/$key_file","$directory/$crt_file"]: + file { ["$directory/$key_file","$directory/$crt_file"]: owner => $owner, group => $group, - mode => $mode - } + mode => $mode, + } } - } |