Add class to handle welcome rsa key

Currently this functionality lives internally
on modules using gerrit, and will be good if that
can be isolated on a class of the module.

Change-Id: I318e09ddbaedb2459b47e340a1826123a0dba52b
This commit is contained in:
Yolanda Robla 2015-08-06 14:18:39 +02:00
parent 6664f2dc37
commit bf2d7d81a5
1 changed files with 24 additions and 0 deletions

24
manifests/welcome.pp Normal file
View File

@ -0,0 +1,24 @@
# == Class: gerrit::welcome
#
class gerrit::welcome (
$ssh_welcome_rsa_key_contents,
$ssh_welcome_rsa_pubkey_contents,
) {
file { '/home/gerrit2/review_site/etc/ssh_welcome_rsa_key':
owner => 'gerrit2',
group => 'gerrit2',
mode => '0600',
content => $ssh_welcome_rsa_key_contents,
replace => true,
require => File['/home/gerrit2/review_site/etc']
}
file { '/home/gerrit2/review_site/etc/ssh_welcome_rsa_key.pub':
owner => 'gerrit2',
group => 'gerrit2',
mode => '0644',
content => $ssh_welcome_rsa_pubkey_contents,
replace => true,
require => File['/home/gerrit2/review_site/etc']
}
}