summaryrefslogtreecommitdiff
path: root/manifests/gpg_mailgate.pp
blob: 44770a9c5a3f77bf6b4654eb4a285cd4745fd250 (plain)
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
33
34
35
36
37
38
39
40
41
class mail::gpg_mailgate {
  group { "gpg_mailgate":
    ensure    => present,
    allowdupe => false,
  }

  user { "gpg_mailgate":
    ensure    => present,
    allowdupe => false,
    gid       => 'gpg_mailgate',
    require   => Group['gpg_mailgate'],
    home      => '/var/lib/gpg_mailgate',
  }

  vcsrepo { "/var/lib/gpg_mailgate":
    ensure   => present,
    provider => git,
    source   => 'git://github.com/ajgon/gpg-mailgate',
    revision => '078381c2ddf05f0a5701f00bffa99e178ab658c9',
    owner    => 'gpg_mailgate',
    group    => 'gpg_mailgate',
    require  => [ User['gpg_mailgate'], Group['gpg_mailgate'] ],
  }

  file { '/usr/local/bin/gpg-mailgate.py':
    ensure  => '/var/lib/gpg_mailgate/gpg-mailgate.py',
    owner   => root,
    group   => root,
    require => Vcsrepo['/var/lib/gpg_mailgate'],
  }

  file { '/etc/gpg-mailgate.conf':
    ensure => present,
    owner   => gpg_mailgate,
    group   => gpg_mailgate,
    mode    => 0600,
    require => Vcsrepo['/var/lib/gpg_mailgate'],
    source  => [ "puppet:///modules/site_mail/gpg_mailgate/gpg-mailgate.conf",
                 "puppet:///modules/mail/gpg_mailgate/gpg-mailgate.conf" ],
  }
}