aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/sympa/manifests/init.pp16
-rw-r--r--modules/sympa/templates/list.xml15
2 files changed, 31 insertions, 0 deletions
diff --git a/modules/sympa/manifests/init.pp b/modules/sympa/manifests/init.pp
index b4bac2bd..8ad97342 100644
--- a/modules/sympa/manifests/init.pp
+++ b/modules/sympa/manifests/init.pp
@@ -70,5 +70,21 @@ class sympa {
mode => 755,
}
}
+
+ define list($subject, $profile, $language = 'en') {
+
+ $xml_file = "/etc/sympa/lists_xml/$name.xml"
+
+ file { "$xml_file":
+ owner => root,
+ group => root,
+ content => template('sympa/list.xml')
+ }
+
+ exec { "sympa.pl --create_list --robot=ml.$domain --input_file=$xml_file":
+ refreshonly => true,
+ subscribe => File["$xml_file"]
+ }
+ }
}
diff --git a/modules/sympa/templates/list.xml b/modules/sympa/templates/list.xml
new file mode 100644
index 00000000..b115b6d6
--- /dev/null
+++ b/modules/sympa/templates/list.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" ?>
+<list>
+ <listname><%= name %></listname>
+ <type><%= profile%></type>
+ <subject><%= subject %></subject>
+ <description/>
+ <status>open</status>
+ <language><%= language %></language>
+ <!-- <owner_include multiple="1">
+ <source>my_file</source>
+ </owner_include>
+ -->
+ <!-- TODO adjust later, add moderators pulled by ldap -->
+ <owner multiple="1"><email>misc@zarb.org</email> </owner>
+</list>