|
29 | 29 | |-HEREDOC |
30 | 30 | # lint:endignore |
31 | 31 |
|
32 | | -$operating_system = run_task('peadm::os_identification', 'local://localhost') |
33 | | -$os_string =$operating_system.first.value['_output'] |
| 32 | + $operating_system = run_task('peadm::os_identification', 'local://localhost') |
| 33 | + $os_string =$operating_system.first.value['_output'] |
34 | 34 |
|
35 | | -if 'windows' in $os_string { |
36 | | - $exists = run_command("[System.IO.File]::Exists('${local_path}')", 'local://localhost') |
37 | | - if $exists.first['stdout'].chomp == 'false' { |
38 | | - run_task('peadm::download', 'local://localhost', |
39 | | - source => $source, |
40 | | - path => $local_path, |
41 | | - ) |
42 | | - } |
| 35 | + if 'windows' in $os_string { |
| 36 | + $exists = run_command("[System.IO.File]::Exists('${local_path}')", 'local://localhost') |
| 37 | + if $exists.first['stdout'].chomp == 'false' { |
| 38 | + run_task('peadm::download', 'local://localhost', |
| 39 | + source => $source, |
| 40 | + path => $local_path, |
| 41 | + ) |
| 42 | + } |
43 | 43 |
|
44 | | - $result_size = run_task('peadm::filesize', 'local://localhost', |
45 | | - path => $local_path, |
46 | | - ) |
47 | | - $local_size = $result_size.first.value['_output'] |
48 | | -} else { |
49 | | - $exists = without_default_logging() || { |
50 | | - run_command("test -e '${local_path}'", 'local://localhost', |
51 | | - _catch_errors => true, |
52 | | - ).ok() |
53 | | - } |
54 | | - unless $exists { |
55 | | - run_task('peadm::download', 'local://localhost', |
56 | | - source => $source, |
57 | | - path => $local_path, |
| 44 | + $result_size = run_task('peadm::filesize', 'local://localhost', |
| 45 | + path => $local_path, |
58 | 46 | ) |
59 | | - } |
| 47 | + $local_size = $result_size.first.value['_output'] |
| 48 | + } else { |
| 49 | + $exists = without_default_logging() || { |
| 50 | + run_command("test -e '${local_path}'", 'local://localhost', |
| 51 | + _catch_errors => true, |
| 52 | + ).ok() |
| 53 | + } |
| 54 | + unless $exists { |
| 55 | + run_task('peadm::download', 'local://localhost', |
| 56 | + source => $source, |
| 57 | + path => $local_path, |
| 58 | + ) |
| 59 | + } |
60 | 60 |
|
61 | | - $local_size = run_task('peadm::filesize', 'local://localhost', |
62 | | - path => $local_path, |
63 | | - ).first['size'] |
64 | | -} |
| 61 | + $local_size = run_task('peadm::filesize', 'local://localhost', |
| 62 | + path => $local_path, |
| 63 | + ).first['size'] |
| 64 | + } |
65 | 65 |
|
66 | 66 | $targets_needing_file = run_task('peadm::filesize', $nodes, |
67 | 67 | path => $upload_path, |
|
0 commit comments