Ok,"Off-topic" - I got it.
But is there anyone who has any clue why I recieve these error message?
-really appreciate your answer
The controller: Windows, version 10 20H4, WSL (Windows subsystem for Linux)
Target machine: Windows server 2019
Problem:
ansible winserver -m win_ping
[WARNING]: Could not match supplied host pattern, ignoring: winserver
[WARNING]: No hosts matched, nothing to do
CONTROLLER:
Here´s the hosts file:
[servers]
122.106.11.16
[servers:vars]
ansible_user="[email protected]"
ansible_password=somepassword
ansible_connection=winrm
ansible_winrm_transport=credssp
ansible_winrm_server_cert_validation=ignore
Here´s output from
Ansible --version
ansible [core 2.12.0]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/user1/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible
ansible collection location = /home/user1/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0]
jinja version = 2.10.1
libyaml = True
TARGET MACHINE
winrm get winrm/config/Service
Service
RootSDDL = O:NSG:BADA;;GA;;;BA)(A;;GR;;;IU)S(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)
MaxConcurrentOperations = 4294967295
MaxConcurrentOperationsPerUser = 1500
EnumerationTimeoutms = 240000
MaxConnections = 300
MaxPacketRetrievalTimeSeconds = 120
AllowUnencrypted = false
Auth
Basic = false [Source="GPO"]
Kerberos = true
Negotiate = true
Certificate = false
CredSSP = true [Source="GPO"]
CbtHardeningLevel = Relaxed
DefaultPorts
HTTP = 5985
HTTPS = 5986
IPv4Filter = * [Source="GPO"]
IPv6Filter = * [Source="GPO"]
EnableCompatibilityHttpListener = false
EnableCompatibilityHttpsListener = false
CertificateThumbprint
AllowRemoteAccess = true [Source="GPO"]