Puppet Class: aptly::serve

Defined in:
manifests/serve.pp

Summary

Install and configure Aptly's static file server (aptly serve)

Overview

Parameters:

  • ensure (Enum['stopped','running']) (defaults to: running)

    Ensure to pass on to service type

  • user (String[1]) (defaults to: 'root')

    User to run the service as.

  • group (String[1]) (defaults to: 'root')

    Group to run the service as.

  • listen (Pattern['^([0-9.]*:[0-9]+$|unix:)']) (defaults to: ':8080')

    What IP/port to listen on for HTTP requests.

  • config_file (Stdlib::Absolutepath) (defaults to: '/etc/aptly.conf')

    Absolute path to the Aptly configuration file.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'manifests/serve.pp', line 10

class aptly::serve (
  Enum['stopped','running'] $ensure           = running,
  String[1] $user                             = 'root',
  String[1] $group                            = 'root',
  Pattern['^([0-9.]*:[0-9]+$|unix:)'] $listen = ':8080',
  Stdlib::Absolutepath $config_file           = '/etc/aptly.conf',
) {
  $description = 'Aptly-serve'
  $exec_start  = "/usr/bin/aptly serve -listen=${listen} -config=${config_file}"

  systemd::unit_file { 'aptly-serve.service':
    content => template('aptly/etc/aptly.service.systemd.erb'),
    active  => $ensure == 'running',
    enable  => $ensure == 'running',
  }
}