Defined Type: ocg::service

Defined in:
puppet/modules/ocg/manifests/service.pp

Overview

Parameters:

  • service (Any) (defaults to: $title)
  • hash (Any) (defaults to: undef)


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

define ocg::service (
    $service = $title,
    $hash = undef,
) {
    $remote_suffix = $hash[$service]
    git::clone { $service:
        directory => "${::service::root_dir}/${service}",
        remote    => "https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Collection/OfflineContentGenerator${remote_suffix}",
    }
    npm::install { "${::service::root_dir}/${service}":
        directory => "${::service::root_dir}/${service}",
        require   => Git::Clone[$service],
    }
    service::gitupdate { $service:
        type    => 'nodejs',
        update  => true,
        restart => $service == 'mw-ocg-service',
    }
}