Merge "Add zanata.ini file"

This commit is contained in:
Jenkins 2015-04-07 19:07:59 +00:00 committed by Gerrit Code Review
commit 475bff78c2
2 changed files with 19 additions and 0 deletions

View File

@ -18,8 +18,15 @@ class zanata::client(
$version = '3.4.2', $version = '3.4.2',
$user = 'jenkins', $user = 'jenkins',
$group = 'jenkins', $group = 'jenkins',
$server = '',
$server_url = '',
$server_user = '',
$server_api_key = '',
$homedir = '/home/jenkins/',
) { ) {
$serverid = regsubst($server, '\.', '_', 'G')
file { '/opt/zanata': file { '/opt/zanata':
ensure => directory, ensure => directory,
owner => $user, owner => $user,
@ -69,4 +76,12 @@ class zanata::client(
package { 'openjdk-7-jre-headless': package { 'openjdk-7-jre-headless':
ensure => present, ensure => present,
} }
file { "${homedir}/.config/zanata.ini": # XXX needs to be in homedir
ensure => present,
owner => $user,
group => $group,
mode => '0600',
content => template('zanata/zanata.ini.erb'),
}
} }

4
templates/zanata.ini.erb Normal file
View File

@ -0,0 +1,4 @@
[servers]
<%= @serverid -%>.url=<%= @server_url %>
<%= @serverid -%>.username=<%= @server_user %>
<%= @serverid -%>.key=<%= @server_api_key %>