aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2012-02-05 23:54:47 +0000
committerNicolas Vigier <boklm@mageia.org>2012-02-05 23:54:47 +0000
commit4fc0412f99f25e1d54d6bebd43364fd8dd8aff97 (patch)
treef101b7594af15c47c2b24456d92fdda369550ed5
parentacd935a626f701b4bde2e9d32294d53b8fa5b647 (diff)
downloadpuppet-4fc0412f99f25e1d54d6bebd43364fd8dd8aff97.tar
puppet-4fc0412f99f25e1d54d6bebd43364fd8dd8aff97.tar.gz
puppet-4fc0412f99f25e1d54d6bebd43364fd8dd8aff97.tar.bz2
puppet-4fc0412f99f25e1d54d6bebd43364fd8dd8aff97.tar.xz
puppet-4fc0412f99f25e1d54d6bebd43364fd8dd8aff97.zip
add mgasoft module
-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 %>