Hi Michael.

I modified the nova.py script since it turns out it was setup to key on the 
host IP address (public or private). My version resolves by hostname using 
the instance "name" attribute.

Thanks again.
Albion

On Wednesday, December 11, 2013 3:37:02 PM UTC-8, Michael DeHaan wrote:
>
> --host is called to get variables for the host if and only if the 
> inventory script is not optimized to return things all in one call.
>
> More details that should be helpful are listed here:
>
> http://ansibleworks.com/docs/intro_dynamic_inventory.html
>
> and regarding that specifically:
>
> http://ansibleworks.com/docs/developing_inventory.html
>
>
>
>
> On Wed, Dec 11, 2013 at 6:26 PM, AmiableAlbion <[email protected]<javascript:>
> > wrote:
>
>> Hi Michael,
>> Thanks, this sheds some light on it (and works as you indicated).
>>
>> So what is going on under the hood? Is Ansible just calling the nova.py 
>> script with *--list *to get the groups and hostname(s)? Is the *--host*just 
>> for the user or is that called for other functions?
>>
>> Thanks, this is very helpful.
>> Albion
>>
>>
>> On Wednesday, December 11, 2013 2:59:22 PM UTC-8, Michael DeHaan wrote:
>>
>>> So what you select for the host pattern will need to match what comes 
>>> back from the inventory script
>>>
>>> do ./ec2.py --list to see what names come back
>>>
>>> you can also just reference host by groups
>>>
>>>
>>>
>>>
>>> On Wed, Dec 11, 2013 at 5:29 PM, AmiableAlbion <[email protected]> wrote:
>>>
>>>> Hi All,
>>>> I am trying to use the nova.py script provided as a jumping off point 
>>>> for using OpenStack as a dynamic inventory repository.I am experiencing a 
>>>> problem where the script does not work if I use the hostname (claims there 
>>>> is no host by that name). It works fine if I use the IP address. In fact, 
>>>> if I modify the nova.py script to return the JSON associated with a 
>>>> particular hostname, Ansible still claims that "No hosts matched".
>>>>
>>>> I guess I don't understand what Ansible is using in the JSON to key on 
>>>> for the hostname. I am using version 1.3.3.
>>>>
>>>> At least looking at the EC2 example, I see a hostname specified:
>>>>
>>>> *ansible -i ec2.py -u ubuntu us-east-1d -m ping*
>>>>
>>>> This looks like its logging in as the user ubuntu to the host 
>>>> us-east-1d. I am looking for the same behavior in an OpenStack environment.
>>>>
>>>> Albion
>>>>
>>>>
>>>>  -- 
>>>> 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 [email protected].
>>>>
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Michael DeHaan <[email protected]>
>>>
>>> CTO, AnsibleWorks, Inc.
>>> http://www.ansibleworks.com/
>>>
>>>   -- 
>> 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 [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Michael DeHaan <[email protected] <javascript:>>
> CTO, AnsibleWorks, Inc.
> http://www.ansibleworks.com/
>
>  

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to