Puppet Class: puppet_deluge

Defined in:
manifests/init.pp

Overview



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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'manifests/init.pp', line 6

class puppet_deluge {
  if $facts['os']['family'] == 'FreeBSD' {
    include puppet_deluge::freebsd
  }
  elsif $facts['os']['family'] == 'Linux' {
    if $facts['os']['distro'] == 'Ubuntu' {
      if $facts['os']['operatingsystemmajrelease'] >= '16' {
        include puppet_deluge::ubuntu
      }
      else {
        include puppet_deluge::ubuntulegacy
      }
    }
  }

  user { 'deluge':
    ensure  => present,
    groups  => 'deluge',
    comment => 'deluge user',
    home    => '/home/deluge',
    shell   => '/bin/sh',
    require => Group['deluge'],
  }

  group { 'deluge':
    ensure => present,
  }

  file { '/home/deluge':
    ensure  => directory,
    owner   => 'deluge',
    group   => 'deluge',
    mode    => '0744',
    require => User['deluge']
  }

  file { '/home/deluge/.config/deluge/auth':
    owner   => 'deluge',
    group   => 'deluge',
    mode    => '0600',
    source  => 'puppet:///modules/freebsd_deluge_light/auth',
    require => File['/home/deluge'],
  }
  file { '/home/deluge/.config/deluge/core.conf':
    owner   => 'deluge',
    group   => 'deluge',
    mode    => '0600',
    source  => 'puppet:///modules/freebsd_deluge_light/core.conf',
    require => File['/home/deluge'],
  }
}