From 4fc0412f99f25e1d54d6bebd43364fd8dd8aff97 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Sun, 5 Feb 2012 23:54:47 +0000 Subject: add mgasoft module --- modules/mgasoft/manifests/init.pp | 38 ++++++++++++++++++++++++++++++++++ modules/mgasoft/templates/mgasoft.conf | 5 +++++ 2 files changed, 43 insertions(+) create mode 100644 modules/mgasoft/manifests/init.pp create mode 100644 modules/mgasoft/templates/mgasoft.conf diff --git a/modules/mgasoft/manifests/init.pp b/modules/mgasoft/manifests/init.pp new file mode 100644 index 00000000..422b7af3 --- /dev/null +++ b/modules/mgasoft/manifests/init.pp @@ -0,0 +1,38 @@ +class mgasoft( + $anonsvn_soft = 'svn+ssh://svn.mageia.org/svn/soft', + $pubinfodir = '/var/lib/mgasoft/infos', + $pubmirrordir = '/distrib/mirror/software', + $svn_soft_publish = 'svn+ssh://svn.mageia.org/svn/soft_publish', + $mgasoft_login = 'mgasoft' +) { + group { $mgasoft_login: + ensure => present, + } + user { $mgasoft_login: + ensure => present, + comment => "System user to publish software", + managehome => true, + home => "/var/lib/$mgasoft_login", + gid => $mgasoft_login, + require => Group[$mgasoft_login], + } + + package { 'mgasoft-publish': + ensure => installed, + } + + file { '/etc/mgasoft.conf': + ensure => present, + owner => root, + group => root, + mode => 644, + content => template('mgasoft/mgasoft.conf'), + } + + subversion::snapshot { $pubinfodir: + source => $svn_soft_publish, + user => $mgasoft_login, + refresh => '0', + requires => User[$mgasoft_login], + } +} diff --git a/modules/mgasoft/templates/mgasoft.conf b/modules/mgasoft/templates/mgasoft.conf new file mode 100644 index 00000000..eaf6e416 --- /dev/null +++ b/modules/mgasoft/templates/mgasoft.conf @@ -0,0 +1,5 @@ +svn_soft=svn+ssh://svn.mageia.org/svn/soft +anonsvn_soft=<%= anonsvn_soft %> +svn_soft_publish=<%= svn_soft_publish %> +pubinfodir=<%= pubinfodir %> +pubmirrordir=<%= pubmirrordir %> -- cgit v1.2.1