Puppet Class: aptly

Defined in:
modules/aptly/manifests/init.pp

Overview

Class: aptly Sets up a simple aptly repo server serving over http

Set up to only allow root to add packages

Parameters:

  • manage_nginx (Any) (defaults to: true)
  • owner (Any) (defaults to: 'root')
  • group (Any) (defaults to: 'root')


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
# File 'modules/aptly/manifests/init.pp', line 5

class aptly(
    $manage_nginx=true,
    $owner='root',
    $group='root',
){
    require_package('aptly')
    require_package('graphviz') # for aptly graph

    file { '/srv/packages':
        ensure => directory,
        owner  => $owner,
        group  => $group,
        mode   => '0755',
    }

    file { '/etc/aptly.conf':
        ensure => present,
        source => 'puppet:///modules/aptly/aptly.conf',
        owner  => 'root',
        group  => 'root',
        mode   => '0444',
    }

    if $manage_nginx {
        nginx::site { 'aptly-server':
            source => 'puppet:///modules/aptly/aptly.nginx.conf',
        }
    }

    ferm::service { 'aptly':
        proto  => 'tcp',
        port   => '80',
        srange => '$DOMAIN_NETWORKS',
    }
}