Puppet Class: trafficserver::lua_infra

Defined in:
modules/trafficserver/manifests/lua_infra.pp

Overview



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'modules/trafficserver/manifests/lua_infra.pp', line 1

class trafficserver::lua_infra {
    require_package('lua-busted')

    exec { 'unit_tests':
        command     => '/usr/bin/busted --lpath=/etc/trafficserver/lua/?.lua /etc/trafficserver/lua/*',
        refreshonly => true,
    }

    # When a reload is issued, Traffic Server checks if config files have
    # changed before acting. The Lua files are not tracked though, so touch
    # remap.config to trigger an actual reload when we change a Lua script.
    exec { 'trigger_lua_reload':
        command     => '/usr/bin/touch /etc/trafficserver/remap.config',
        refreshonly => true,
    }

    file { '/etc/trafficserver/lua/':
        ensure => directory,
        mode   => '0755',
        owner  => $trafficserver::user,
    }
}