summaryrefslogtreecommitdiff
path: root/sitemodules/profiles/manifests/debarchive.pp
diff options
context:
space:
mode:
Diffstat (limited to 'sitemodules/profiles/manifests/debarchive.pp')
-rw-r--r--sitemodules/profiles/manifests/debarchive.pp45
1 files changed, 25 insertions, 20 deletions
diff --git a/sitemodules/profiles/manifests/debarchive.pp b/sitemodules/profiles/manifests/debarchive.pp
index 70735d9..67cb157 100644
--- a/sitemodules/profiles/manifests/debarchive.pp
+++ b/sitemodules/profiles/manifests/debarchive.pp
@@ -49,25 +49,8 @@ class profiles::debarchive (
) {
include profiles::base
- # remove first try with mini-dinstall
- package { 'mini-dinstall':
- ensure => purged,
- }
- service { 'debarchive':
- ensure => stopped,
- enable => false,
- }
- file { '/etc/systemd/system/debarchive.service':
- ensure => absent,
- }
- exec { 'reload systemd when debarchive.service unit changes':
- command => '/bin/systemctl daemon-reload',
- refreshonly => true,
- subscribe => File['/etc/systemd/system/debarchive.service'],
- notify => Service['debarchive'],
- }
- file { '/srv/debarchive/.mini-dinstall.conf':
- ensure => absent,
+ package{ ['rssh', 'reprepro']:
+ ensure => latest,
}
# setup user, groups and directories
@@ -80,8 +63,9 @@ class profiles::debarchive (
system => true,
gid => 'nogroup',
home => '/srv/debarchive',
- shell => '/bin/false',
+ shell => '/usr/bin/rssh',
purge_ssh_keys => true,
+ require => Package['rssh'],
}
file { '/srv/debarchive':
ensure => directory,
@@ -102,6 +86,27 @@ class profiles::debarchive (
mode => '0700',
}
+ $rssh_conf = '/etc/rssh.conf'
+
+ concat { $rssh_conf:
+ ensure => present,
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ }
+
+ concat::fragment { 'rssh-global':
+ target => $rssh_conf,
+ order => '01',
+ source => 'puppet:///modules/profiles/debarchive/rssh.global.conf',
+ }
+
+ concat::fragment { 'rssh-debarchive':
+ target => $rssh_conf,
+ order => '10',
+ content => 'user=debarchive:022:0001100:/srv/upload',
+ }
+
# setup ssh keys
$uploaders.each |String $username| {
$ssh_keys = $::profiles::base::users[$username]['ssh_keys']