Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect ansible to wsl host #82855

Closed
1 task done
mihalt opened this issue Mar 20, 2024 · 5 comments
Closed
1 task done

Connect ansible to wsl host #82855

mihalt opened this issue Mar 20, 2024 · 5 comments
Labels
affects_2.16 bug This issue/PR relates to a bug. module This issue/PR relates to a module.

Comments

@mihalt
Copy link

mihalt commented Mar 20, 2024

Summary

Hi! I configured wsl2 by this manual https://www.hanselman.com/blog/the-easy-way-how-to-ssh-into-bash-and-wsl2-on-windows-10-from-an-external-machine

And I want to rule it from another linux device with installed ansible.

But when I ansible ping wsl device, just nothing happens. And it doesn't end while I not do Ctrl + C.

Issue Type

Bug Report

Component Name

ping

Ansible Version

$ ansible --version
ansible [core 2.16.4]
  config file = None
  configured module search path = ['/home/mihail/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/mihail/.local/lib/python3.10/site-packages/ansible
  ansible collection location = /home/mihail/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/mihail/.local/bin/ansible
  python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True

Configuration

# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
CONFIG_FILE() = None

OS / Environment

Windows 10 + WSL2 2.1.5

Steps to Reproduce

1. Configure OpenSSH on windows
2. Choose wsl bash as default ssh terminal
3. Try to `ansible all -m ping -i inventory.ini` windows via ssh

Expected Results

successful ping or at least any error

Actual Results

Nothing happens

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibot ansibot added bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. affects_2.16 module This issue/PR relates to a module. labels Mar 20, 2024
@ansibot
Copy link
Contributor

ansibot commented Mar 20, 2024

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the component bot command.

@konstruktoid
Copy link
Contributor

Hi @mihalt, just to check; There's no issues connecting to the ssh server from the host running ansible?

@mihalt
Copy link
Author

mihalt commented Mar 20, 2024

Hi @mihalt, just to check; There's no issues connecting to the ssh server from the host running ansible?

no, manual ssh works fine. I can ssh from linux with ansible to windows and vise versa.

@mihalt
Copy link
Author

mihalt commented Mar 20, 2024

Hi @mihalt, just to check; There's no issues connecting to the ssh server from the host running ansible?

If I connect from anslible linux to windows (no wsl) with win_ping, works fine too.

@nitzmahone
Copy link
Member

Hi!

Thanks very much for your interest in Ansible. It means a lot to us.

This appears to be a user question, and we'd like to direct these kinds of things to a community forum:

Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time.
If don't you think this particular issue is resolved, you should still stop by there first, we'd appreciate it.
This allows us to keep the issue tracker for bugs, pull requests, RFEs and the like.

Thank you once again and we look forward to seeing you on the list or IRC. Thanks!

@nitzmahone nitzmahone closed this as not planned Won't fix, can't repro, duplicate, stale Mar 21, 2024
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Mar 21, 2024
@ansible ansible locked and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.16 bug This issue/PR relates to a bug. module This issue/PR relates to a module.
Projects
None yet
Development

No branches or pull requests

5 participants