Connecting to Linux and Windows hosts

Please, help me to understand, how fill hosts file.
Now i have linux hosts and it’s work’s fine.
Exaple, how host file look’s like:

[all:vars]
ansible_connection=ssh
ansible_ssh_user=user
ansible_ssh_pass=user_pass
[host_linux]
192.168.[1:254].[1:3]

When trying to add windows hosts (ip adresses may be same as linux, because hosts about 1000 and i don’t know exatly where linux\windows installed) with windows vars - all hosts including linux and windows hosts began connecting using winrm.
Host file looks like:

[host_linux]
ansible_connection=ssh
ansible_ssh_user=user
ansible_ssh_pass=user_pass
[host_linux]
192.168.[1:254].[1:3]

[host_windows:vars]
ansible_user=user
ansible_password=user_pass
ansible_connection=winrm
ansible_winrm_server_cert_validation=ignore
ansible_winrm_transport=basic

[host_windows]
192.168.[1:254].[1:3]

How do I fill in the host file so that Linux hosts run using ssh, Windows hosts using winrm.

Not sure if i get your question. You can specify the group specific variables including connection method like below. You need to identify their OS so that you could specify which host will use which connection method.

[all:vars]
ansible_connection=ssh
ansible_ssh_user=user
ansible_ssh_pass=user_pass

[host_linux]
192.168.[1:254].[1:3]

[host_linux:vars]
ansible_connection=ssh

[host_windows]
10.10.10.10

[host_windows:vars]
ansible_connection=winrm