# -*- mode: yaml; indent-tabs-mode: nil; tab-width: 2; coding: utf-8-unix -*-

---

- name: "DEBUG: Including proxy local_connection.yml"
  debug:
    verbosity: 1
    msg: "DEBUG: Including proxy local_connection.yml BASE_ARE_CONNECTED={{BASE_ARE_CONNECTED}}"

- block:

  - name: Convert-WindowsImage-and-Resize-VHDX-Command.zip
    shell: |
      [ -e /e/net/Http/devblogs.microsoft.com/wp-content/uploads/sites/32/2019/03/Convert-WindowsImage-and-Resize-VHDX-Command.zip ] || \
        wget --restrict-file-names=windows -xcP /e/net/Http/devblogs.microsoft.com/wp-content/uploads/sites/32/2019/03/Convert-WindowsImage-and-Resize-VHDX-Command.zip
      [ -d /e/lib/PowerShell ] || mkdir /e/lib/PowerShell
      [ -f /e/lib/PowerShell/"Convert-WindowsImage.ps1" ] || \
        unzip -o /e/tmp/Topics/ConvertVhd/devblogs.microsoft.com/wp-content/uploads/sites/32/2019/03/Convert-WindowsImage-and-Resize-VHDX-Command.zip \
          -d /e/lib/PowerShell

  #  206326  Defl:N    35661  83% 2017-01-18 21:01 816b27ad  Convert-WindowsImage.ps1
  #     173  Defl:N      141  19% 2017-01-21 11:08 51449cb6  ReSize VHDX Commands.t

  - name: dsfok.zip
    shell: |
      # https://stackoverflow.com/questions/37481737/error-when-converting-vmware-virtual-disk-to-hyperv
      # https://gist.github.com/sukesh-ak/9a633c48ceefe9560b8f2eb5d8fcff72
      # https://docs.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-generic
      # https://gist.github.com/rahilwazir/69a750b70348459875cbf40935af02cbxf
      [ -d https://web.archive.org/web/20190910101150/http://members.ozemail.com.au/%7Enulifetv/freezip/freeware/dsfok.zip ] || \
        wget --restrict-file-names=windows -xcP /e/var/local/net/Http \
            https://web.archive.org/web/20190910101150/http://members.ozemail.com.au/%7Enulifetv/freezip/freeware/dsfok.zip || exit 1
      [ -d /e/lib/dsfok ] || {
          unzip /e/var/local/net/Http/web.archive.org/web/20190910101150/http%3A/members.ozemail.com.au/~nulifetv/freezip/freeware/dsfok.zip -d /e/lib
          exit 2
          }

  when:
    - BASE_ARE_CONNECTED|default('') != ''
