Puppet Class: remediate_install::install::windows

Defined in:
manifests/install/windows.pp

Summary

Install remediate on windows

Overview

Parameters:

  • install_dir (String)

    Directory where to install Remediate

  • license_file (String)

    Full qualified filename of the license file including path

  • compose_dir (String) (defaults to: '')

    Directory where to install docker-compose binary

  • compose_url (String) (defaults to: 'https://storage.googleapis.com/remediate/stable/latest/docker-compose.yml')

    URL of the Remediar docker compose file



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
# File 'manifests/install/windows.pp', line 17

class remediate_install::install::windows (
  String $install_dir,
  String $license_file,
  String $compose_dir   = '',
  String $compose_url   = 'https://storage.googleapis.com/remediate/stable/latest/docker-compose.yml',
){

  $cmd = 'docker-compose run remediate start --license-file license.json'

  file { $install_dir:
    ensure   => directory,
  }

  file { $license_file:
    ensure  => file,
    noop    => true,
    require => File[$install_dir],
  }

  archive { "${install_dir}/docker-compose.yml":
    ensure         => present,
    source         => $compose_url,
    require        => File[$install_dir],
    notify         => Exec['install-remediate'],
    allow_insecure => true,
  }

  file { "${install_dir}/license.json":
    ensure  => file,
    source  => "file:///${license_file}",
    require => File[$license_file],
    before  => Exec['install-remediate']
  }

  exec { 'install-remediate':
    command   => $cmd,
    cwd       => $install_dir,
    logoutput => true,
    path      => ['C:/Program Files/Docker/'],
  }
}