The children of a group in the inventory are assumed to be hostnames,
not other groups. This is why ssh is trying to find that groupname in
the ssh config, because it's supposed to be a host.

If you want to put a group as a child of another group you need to use
this syntax:

[productiont:children]
webservers
databases

See http://docs.ansible.com/intro_inventory.html

On Mon, Nov 3, 2014 at 11:07 AM, ansi...@construct.pm <m...@construct.pm> wrote:
> To clarify my inventory file now looks like this:
>
> [webservers]
> hostname01
>
> [databases]
> hostname02
>
> [production]
> webservers
> databases
>
>
> On Monday, November 3, 2014 4:05:36 PM UTC, ans...@construct.pm wrote:
>>
>> Hi there,
>>
>> I have a simple inventory file and a ssh config entry for each host.
>>
>> Inventory file:
>> ```
>> [webservers]
>> hostname01
>>
>> [databases]
>> hostname02
>> ```
>> ssh config:
>> ```
>> Host hostname01
>>   HostName hostname01.domain.com
>>   IdentityFile hostkey.key
>>
>> Host hostname02
>>   HostName hostname02.domain.com
>>   IdentityFile hostkey.key
>> ```
>> This all worked file then I added a group of groups to the inventory and
>> not Ansible is searching for webservers not hostname01 in ssh config. For a
>> single host I can easily modify the Host section of ssh config... but when
>> that group webservers has 10 hosts in it what do I do then?
>
> --
> 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-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/a4d6134d-c4b9-47df-bda8-6b9b54e8b1ae%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJQqANdZLp8BZgqrKhg37UN%2Bzq9CD-d0LbHN3MUz1%2Bb%3D%2BeM24A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to