Puppet Class: wdqs::deploy::scap

Defined in:
modules/wdqs/manifests/deploy/scap.pp

Overview

the wdqs package is managed by scap

Parameters:

  • deploy_user (String)
  • username (String)
  • package_dir (Stdlib::Absolutepath)


2
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
# File 'modules/wdqs/manifests/deploy/scap.pp', line 2

class wdqs::deploy::scap(
    String $deploy_user,
    String $username,
    Stdlib::Absolutepath $package_dir,
) {
    # Deployment
    scap::target { 'wdqs/wdqs':
        service_name              => 'wdqs-blazegraph',
        deploy_user               => $deploy_user,
        additional_services_names => ['wdqs-updater', 'wdqs-categories'],
        manage_user               => true,
    }

    $git_deploy_dir = '/srv/deployment/wdqs/wdqs'
    if $package_dir != $git_deploy_dir {

        file { $package_dir:
            ensure  => link,
            target  => $git_deploy_dir,
            owner   => $username,
            group   => 'wikidev',
            mode    => '0775',
            require => Scap::Target['wdqs/wdqs'],
        }
    } else {
        # This is to have file resource on $package_dir in any case
        file { $package_dir:
            ensure  => present,
            require => Scap::Target['wdqs/wdqs'],
        }
    }

}