Ansible Inventory

27 views
Skip to first unread message

Sanju

unread,
Aug 27, 2017, 12:08:17 PM8/27/17
to Ansible Project
Hello Folks,

My Inventory has a mix of Linux and windows hosts. Under every group i dont want to pass the connection information like ansible_connection=winrm, ansible_port=5986 etc.. I want to have a standard location for the connection information and I dont want to pass connection info for every group as my inventory will have hundreds of groups?

[xxx]
linux.com ansible_connection=ssh
windows.com ansible_connection=winrm

What can I do to address this situation?

Thanks

Dick Davies

unread,
Aug 27, 2017, 12:42:48 PM8/27/17
to ansible list
You want group vars (unless your windows and linux hosts are in the same group,
but unless you're applying the same roles to both you probably don't
have that.).

http://docs.ansible.com/ansible/latest/intro_inventory.html#splitting-out-host-and-group-specific-data
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/9326b40c-c2fe-4879-a867-5f37ecbe9c8c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages