Skip to content

Latest commit

 

History

History
309 lines (181 loc) · 5.91 KB

REFERENCE.md

File metadata and controls

309 lines (181 loc) · 5.91 KB

Reference

Table of Contents

Classes

Defined types

Classes

approx

Approx apt proxy server, main class

specific repositories have to be defined with apt::approx::repository.

Examples

hiera usage to configure repositories
approx::config:
  debian:
    url: 'http://ftp.ch.debian.org/debian'
  debian-security:
    url: 'http://security.debian.org/debian-security'
  debian-backports:
    url: 'http://ftp.ch.debian.org/debian-backports'
Example (hiera) to create an xinetd service using puppetlabs-xinetd
approx::create_resources:
  xinetd::service:
    approx:
      server: '/usr/sbin/approx'
      user: 'approx'

Will result in  executing:
  xinetd::service{'approx':
    server => '/usr/sbin/approx'
    user   => 'approx'

Parameters

The following parameters are available in the approx class:

conffile

Data type: String

path to the configuration file

cache

Data type: Optional[String]

path of the approx cache directory

Default value: undef

ensure_cache

Data type: Boolean

if true it ensures that the cache directories are created

Default value: true

interval

Data type: Optional[Integer]

time in minutes after which a cached file will be considered too old to deliver

Default value: undef

max_rate

Data type: Optional[Variant[Integer, Enum['unlimited']]]

maximum download rate from remote repositories, in bytes per second

Default value: undef

max_redirects

Data type: Optional[Integer]

maximum number of HTTP redirections

Default value: undef

user

Data type: Optional[String]

user that owns the files in cache

Default value: undef

group

Data type: Optional[String]

group that owns the files in cache

Default value: undef

syslog

Data type: Optional[String]

syslog facility to use when logging

Default value: undef

pdiffs

Data type: Optional[Boolean]

whether to support IndexFile diffs

Default value: undef

offline

Data type: Optional[Boolean]

whether to deliver (possibly out-of-date) cached files

Default value: undef

max_wait

Data type: Optional[Integer]

how many seconds an approx(8) process will wait for a concurrent download

Default value: undef

verbose

Data type: Optional[Boolean]

whether informational messages should be printed in the log

Default value: undef

debug

Data type: Optional[Boolean]

whether debugging messages should be printed in the log

Default value: undef

config

Data type: Hash

Hash of repositories to configure

Default value: {}

create_resources

Data type: Hash

a Hash of Hashes to create additional resources Defaults to {} (do not create any additional resources)

Default value: {}

approx::systemd_socket

if on a system with systemd, you can use this class to alter port/ip to listen on.

Parameters

The following parameters are available in the approx::systemd_socket class:

listen_streams

Data type: Optional[Array[String]]

Array of ListenStream option to listen if undef (default) the dropin is set to absent Example (yaml): approx::systemd_socket::listen_streams: - '127.0.0.1:9999' - '[::1]:9999'

Default value: undef

unit

Data type: Systemd::Unit

The target unit file to create

Default value: 'approx.socket'

service_name

Data type: String[1]

the name of the service we want to ensure

Default value: 'approx.socket'

service_ensure

Data type: String[1]

state of the service to ensure

Default value: 'running'

service_enable

Data type: Boolean

if the service should be enabled or not

Default value: true

Defined types

approx::repository

Add a repository line to an approx proxy

Examples

basic usage
approx::repository{'debian-security':
  url => 'http://security.debian.org/debian-security',
}

Parameters

The following parameters are available in the approx::repository defined type:

url

Data type: String

URL to add to the proxy

reponame

Data type: String

Name for this repository on the approx proxy. Defaults to $title.

Default value: $title

order

Data type: String

Order for the concat. Defaults to '50'

Default value: '50'