Puppet Class: visualdiff

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

Overview

SPDX-License-Identifier: Apache-2.0

Class: visualdiff

This module provides a standalone visual diffing service.



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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'modules/visualdiff/manifests/init.pp', line 5

class visualdiff {

    $visualdiff_packages = [
        'nodejs',
        'npm',
        'uprightdiff',
    ]

    ensure_packages($visualdiff_packages)

    systemd::sysuser { 'visualdiff':
        home_dir => '/srv/visualdiff',
    }

    file { '/var/log/visualdiff':
        ensure => directory,
        owner  => 'visualdiff',
        group  => 'visualdiff',
        mode   => '0755',
    }

    file { '/etc/visualdiff':
        ensure => directory,
        owner  => 'root',
        group  => 'root',
        mode   => '0755',
    }

    git::clone { 'integration/visualdiff':
        branch    => 'scandium',
        owner     => 'root',
        group     => 'wikidev',
        directory => '/srv/visualdiff',
        before    => File['/srv/visualdiff/pngs'],
    }

    # visual-diff testreduce clients save the
    # parsoid and php parser screenshots and
    # the screenshot diff to this directory.
    file { '/srv/visualdiff/pngs':
        ensure => directory,
        owner  => 'testreduce',
        group  => 'testreduce',
        mode   => '0775',
    }

    file { '/srv/visualdiff/testreduce':
        ensure => directory,
        owner  => 'root',
        group  => 'wikidev',
    }

    # create an empty testrun.ids but only if it does not exist
    # don't change content in existing file (T215049)
    file { '/srv/visualdiff/testreduce/testrun.ids':
        ensure  => present,
        replace => false,
        content => 'puppet-init',
        owner   => 'testreduce',
        group   => 'testreduce',
        mode    => '0775',
        require => File['/srv/visualdiff/testreduce'],
    }
}