Defined Type: visualdiff::server

Defined in:
modules/visualdiff/manifests/server.pp

Overview

SPDX-License-Identifier: Apache-2.0 FIXME: This is currently not enabled and configured. To be done.

The user-facing webapp that can be used to generate one off visual diffs.

Parameters

instance_name

Name of the visual-diffing service.

webapp_port

The port for the webapp. Default: 8012.

Parameters:

  • instance_name (Any)
  • webapp_port (Any) (defaults to: 8012)


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
42
# File 'modules/visualdiff/manifests/server.pp', line 15

define visualdiff::server(
    $instance_name,
    $webapp_port = 8012,
) {
    file { "/etc/visualdiff/${instance_name}.config.js":
        content => template("visualdiff/${instance_name}.config.js.erb"),
        owner   => 'root',
        group   => 'root',
        mode    => '0444',
        notify  => Service[$instance_name],
    }

    file { "/lib/systemd/system/${instance_name}.service":
        source => "puppet:///modules/visualdiff/${instance_name}.systemd.service",
        owner  => 'root',
        group  => 'root',
        mode   => '0444',
        notify => Service[$instance_name],
    }

    service { $instance_name:
        ensure  => running,
        require => [
            File["/etc/visualdiff/${instance_name}.config.js"],
            File["/lib/systemd/system/${instance_name}.service"],
        ],
    }
}