aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-09-13 15:51:59 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-09-13 15:51:59 -0300
commitcb1785a14eb483d78e81ff8fd9e5ee204002494d (patch)
tree7cacd86e0d99df5892b38e8091edb8a1fb5fc622
parentbe898939a839cca4a0134c34232a7216a4f2e39e (diff)
downloadpuppet-nodo-cb1785a14eb483d78e81ff8fd9e5ee204002494d.tar.gz
puppet-nodo-cb1785a14eb483d78e81ff8fd9e5ee204002494d.tar.bz2
Adding schroot::instance
-rw-r--r--manifests/subsystems/schroot.pp14
-rw-r--r--templates/schroot/schroot.conf.erb10
2 files changed, 18 insertions, 6 deletions
diff --git a/manifests/subsystems/schroot.pp b/manifests/subsystems/schroot.pp
index d6c4c13..acc0361 100644
--- a/manifests/subsystems/schroot.pp
+++ b/manifests/subsystems/schroot.pp
@@ -3,11 +3,13 @@ class schroot {
ensure => installed,
}
- file { '/etc/schroot/schroot.conf':
- ensure => present,
- owner => root,
- mode => 0644,
- require => Package['schroot'],
- source => "puppet:///modules/site-nodo/schroot/$fqdn/schroot.conf",
+ define instance($type = 'plain', description, $directory, $users, $groups, $aliases, $ensure = 'present') {
+ file { '/etc/schroot/schroot/chroot.d':
+ ensure => $ensure,
+ owner => root,
+ mode => 0644,
+ require => Package['schroot'],
+ content => template('nodo/schroot/schroot.conf.erb'),
+ }
}
}
diff --git a/templates/schroot/schroot.conf.erb b/templates/schroot/schroot.conf.erb
new file mode 100644
index 0000000..c9a524f
--- /dev/null
+++ b/templates/schroot/schroot.conf.erb
@@ -0,0 +1,10 @@
+#
+# Managed by puppet
+#
+[<%= name %>]
+type=<%= type %>
+description=<%= description %>
+directory=<%= directory %>
+users=<%= users %>
+groups=<%= groups %>
+aliases=<%= aliases %>