aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/mgasoft/manifests/init.pp38
-rw-r--r--modules/mgasoft/templates/mgasoft.conf5
2 files changed, 43 insertions, 0 deletions
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 %>