summaryrefslogtreecommitdiffstats
path: root/modules/borg/manifests/init.pp
blob: 2f43f839c072d2c2306a21d674a2f8b4c8b0bc34 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
class borg($home = '/media/persistent/borg') {
  package { 'borg':
    ensure => installed;
  }

  group { 'borg':
    ensure => present;
  }

  user { 'borg':
    ensure => present,
    gid => 'borg',
    home => $home;
  }

  file {
    "/media/persistent/borg/":
      ensure => directory,
      owner => 'borg',
      group => 'borg',
      require => User['borg'];
    "/media/persistent/borg/.ssh":
      ensure => directory,
      owner => 'borg',
      group => 'borg',
      require => User['borg'];
  }

  sshd::configsection { 'borg':
    source => 'puppet:///modules/borg/sshd_config';
  }
}