Skip to content
This repository has been archived by the owner on Jun 12, 2021. It is now read-only.

Provide support for winrm connection #121

Open
ElAntagonista opened this issue Apr 12, 2019 · 4 comments
Open

Provide support for winrm connection #121

ElAntagonista opened this issue Apr 12, 2019 · 4 comments
Labels
enhancement New feature or request investigate

Comments

@ElAntagonista
Copy link

Although it might be a hustle, it would be great if this provisioner could provide support for provisioning windows machines with Ansible.

@radekg radekg added enhancement New feature or request investigate labels Apr 14, 2019
@radekg
Copy link
Owner

radekg commented Apr 14, 2019

Hi @ElAntagonista, definitely. I have been thinking about this recently. My biggest problem with this is, I have no idea how to test it without having to launch a Windows VM. There isn't also an easy way to integrate such tests using a third-party CI. I might be wrong though.

@gvcgael
Copy link

gvcgael commented Jul 30, 2019

@radekg You can use appveyor to run tests on Windows VM ( https://appveyor.com/ )

I used it for my personal projects with great success.

@radekg radekg pinned this issue Sep 1, 2019
@Kandan-Devops
Copy link

@radekg - Is there any update to support for winrm connection. I have tried to downloaded latest version of 2.3.0 and its showing error like it only support SSH connections currently. If any latest versions available to support WINRM connection please let me know.

Regards,
Kandan K

@ivandeex
Copy link

ivandeex commented Nov 10, 2020

@radekg

You don't need appveyor nor azure-pipelines anymore to run your tests on Windows. The Github native CI ("actions") provide Windows, Linux and MacOS runners: https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#supported-software

Here is a short working example of running a test on Github Windows runner: https://medium.com/rkttu/write-your-github-actions-workflow-for-build-windows-application-94e5a989f477

# .github/workflows/test.yml
name: radeks_test
on:
  push:
    branches:
      - master
jobs:
  test_radeks_provisioner:
    runs-on: windows-latest
    steps:
      - name: powershell
        shell: powershell
        run: |
          echo "hello from windows powershell"

A more complex example that installs golang toolchain on both Linux and Windows, builds executable and runs tests: https://github.com/rclone/rclone/blob/master/.github/workflows/build.yml#L135

How to configure WinRM:

Just run terraform under test right on the same runner and connect via WinRM to localhost
(their Windows runner has docker installed but can't run Linux containers yet - https://github.community/t/docker-compose-on-windows-latest/17130).

@radekg radekg unpinned this issue Apr 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request investigate
Projects
None yet
Development

No branches or pull requests

5 participants