Defined Type: thumbor::instance

Defined in:
modules/thumbor/manifests/instance.pp

Overview

Define: thumbor::instance

Sets up a new Thumbor instance.

Parameters

title

This instance's listening port.

Examples

thumbor::instance { '8888': }


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'modules/thumbor/manifests/instance.pp', line 14

define thumbor::instance
{
    $port = $name

    file { "/usr/lib/tmpfiles.d/thumbor@${port}.conf":
        content => template('thumbor/thumbor.tmpfiles.d.erb'),
    }

    exec { "create-tmp-folder-${port}":
        command => '/bin/systemd-tmpfiles --create --prefix=/srv/thumbor/tmp',
        creates => "/srv/thumbor/tmp/thumbor@${port}",
        before  => Service["thumbor@${port}"],
    }

    service { "thumbor@${port}":
        ensure   => running,
        provider => 'systemd',
        enable   => true,
        require  => File['/lib/systemd/system/thumbor@.service'],
    }
}