diff --git a/manifests/client.pp b/manifests/client.pp index cdfb7f5..9925f69 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -18,8 +18,15 @@ class zanata::client( $version = '3.4.2', $user = 'jenkins', $group = 'jenkins', + $server = '', + $server_url = '', + $server_user = '', + $server_api_key = '', + $homedir = '/home/jenkins/', ) { + $serverid = regsubst($server, '\.', '_', 'G') + file { '/opt/zanata': ensure => directory, owner => $user, @@ -69,4 +76,12 @@ class zanata::client( package { 'openjdk-7-jre-headless': 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'), + } } diff --git a/templates/zanata.ini.erb b/templates/zanata.ini.erb new file mode 100644 index 0000000..ca65567 --- /dev/null +++ b/templates/zanata.ini.erb @@ -0,0 +1,4 @@ +[servers] +<%= @serverid -%>.url=<%= @server_url %> +<%= @serverid -%>.username=<%= @server_user %> +<%= @serverid -%>.key=<%= @server_api_key %>