Puppet Class: scap::l10nupdate

Defined in:
modules/scap/manifests/l10nupdate.pp

Summary

Uninstalls l10nupdate.

Overview

SPDX-License-Identifier: Apache-2.0



3
4
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
# File 'modules/scap/manifests/l10nupdate.pp', line 3

class scap::l10nupdate () {
    # HACK: On Cloud VPS, the l10nupdate user is defined in LDAP, so
    # trying to delete it locally fails with a confusing error message.
    if $::realm != 'labs' {
        user { 'l10nupdate':
            ensure => absent,
        }

        group { 'l10nupdate':
            ensure => absent,
        }
    }

    file { '/home/l10nupdate':
        ensure  => absent,
        recurse => true,
        purge   => true,
        force   => true,
    }

    systemd::timer::job { 'l10nupdate':
        ensure          => absent,
        description     => 'l10nupdate',
        user            => 'l10nupdate',
        command         => '/usr/local/bin/l10nupdate-1 --verbose',
        logfile_basedir => '/var/log/l10nupdatelog/',
        logfile_name    => 'l10nupdate.log',
        interval        => { 'start' => 'OnCalendar', 'interval' => 'Mon,Tue,Wed,Thu *-*-* 02:00:00'},
    }

    file { '/usr/local/bin/l10nupdate':
        ensure => absent,
    }
    file { '/usr/local/bin/l10nupdate-1':
        ensure => absent,
    }

    sudo::user { 'l10nupdate':
        ensure     => absent,
        user       => 'l10nupdate',
        privileges => [],
    }

    # Make sure the log directory exists and has adequate permissions.
    # It's called l10nupdatelog because /var/log/l10nupdate was used
    # previously so it'll be an existing file on some systems.
    # Also create the dir for the SVN checkouts, and set up log rotation
    file { '/var/log/l10nupdatelog':
        ensure  => absent,
        recurse => true,
        purge   => true,
        force   => true,
    }
    file { '/var/lib/l10nupdate':
        ensure  => absent,
        recurse => true,
        purge   => true,
        force   => true,
    }
}