|
12 | 12 | # @param refreshonly |
13 | 13 | # @param onlyif |
14 | 14 | # |
15 | | -define docker::exec( |
16 | | - Optional[Boolean] $detach = false, |
17 | | - Optional[Boolean] $interactive = false, |
18 | | - Optional[Array] $env = [], |
19 | | - Optional[Boolean] $tty = false, |
20 | | - Optional[String] $container = undef, |
21 | | - Optional[String] $command = undef, |
22 | | - Optional[String] $unless = undef, |
23 | | - Optional[Boolean] $sanitise_name = true, |
24 | | - Optional[Boolean] $refreshonly = false, |
25 | | - Optional[String] $onlyif = undef, |
| 15 | +define docker::exec ( |
| 16 | + Boolean $detach = false, |
| 17 | + Boolean $interactive = false, |
| 18 | + Array $env = [], |
| 19 | + Boolean $tty = false, |
| 20 | + Optional[String] $container = undef, |
| 21 | + Optional[String] $command = undef, |
| 22 | + Optional[String] $unless = undef, |
| 23 | + Boolean $sanitise_name = true, |
| 24 | + Boolean $refreshonly = false, |
| 25 | + Optional[String] $onlyif = undef, |
26 | 26 | ) { |
27 | 27 | include docker::params |
28 | 28 |
|
|
31 | 31 | if $facts['os']['family'] == 'windows' { |
32 | 32 | $exec_environment = "PATH=${::docker_program_files_path}/Docker/" |
33 | 33 | $exec_timeout = 3000 |
34 | | - $exec_path = [ "${::docker_program_files_path}/Docker/", ] |
| 34 | + $exec_path = ["${::docker_program_files_path}/Docker/",] |
35 | 35 | $exec_provider = 'powershell' |
36 | 36 | } else { |
37 | 37 | $exec_environment = 'HOME=/root' |
38 | | - $exec_path = [ '/bin', '/usr/bin', ] |
| 38 | + $exec_path = ['/bin', '/usr/bin',] |
39 | 39 | $exec_timeout = 0 |
40 | 40 | $exec_provider = undef |
41 | 41 | } |
42 | 42 |
|
43 | | - $docker_exec_flags = docker_exec_flags( |
44 | | - { |
| 43 | + $docker_exec_flags = docker_exec_flags( { |
45 | 44 | detach => $detach, |
46 | 45 | interactive => $interactive, |
47 | 46 | tty => $tty, |
48 | 47 | env => any2array($env), |
49 | 48 | } |
50 | 49 | ) |
51 | 50 |
|
52 | | - |
53 | 51 | if $sanitise_name { |
54 | 52 | $sanitised_container = regsubst($container, '[^0-9A-Za-z.\-_]', '-', 'G') |
55 | 53 | } else { |
|
0 commit comments