# ansible\_connection ansible\_user

**URL:** <https://forum.ansible.com/t/ansible-connection-ansible-user/23748>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [February 16, 2017, 7:25pm UTC](https://forum.ansible.com/t/ansible-connection-ansible-user/23748 "2017-02-16T19:25:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![trg.achilles](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@trg.achilles](https://forum.ansible.com/u/trg.achilles)\
**Post date:** [February 16, 2017, 7:25pm UTC](https://forum.ansible.com/t/ansible-connection-ansible-user/23748/1 "2017-02-16T19:25:22Z")

</div>

Hello,

I’m new to ansible and struggle to find a way create a role that could install application both on Windows and Linux os. I’m having problem to allocate correct ansible\_connection ansible\_user. It seems like if I set in vars connection parameters for Windows that affects Linux access and vice-versa if default settings are used. Is there a way to use variables for connection in a smart way. I was thinking abot option where one type of connection settings is used (winrm) and if not successful use default (ssh). Currently I update my inventory file without assigning any new host to specific OS group so I don’t know which host uses Linux and which Windows.

I would appreciate any help or maybe examples, references to resources specific to this problem

Best regards,

Rafal
