I checked that one, seems close, does that mean this feature is now in ? 
the docs does not talk about that - 
https://docs.ansible.com/ansible/devel/scenario_guides/vmware_scenarios/vmware_inventory_filters.html
 


Thanks 

On Tuesday, September 8, 2020 at 12:17:32 AM UTC-7 Abhijeet Kasurde wrote:

> Hi,
> I raised a PR to address - how to use filters in vmware_vm_inventory - 
> https://github.com/ansible/ansible/pull/71670 
> Please provide the feedback. 
>
> On Sat, Sep 5, 2020 at 9:10 AM [email protected] <[email protected]> 
> wrote:
>
>> The page 
>>
>>
>> https://docs.ansible.com/ansible/devel/scenario_guides/vmware_scenarios/vmware_inventory_hostnames.html
>>
>>
>> Does not talk or give examples of filter .. 
>>
>>
>>
>> On Friday, September 4, 2020 at 8:25:48 PM UTC-7 [email protected] wrote:
>>
>>> i tested & found below works though 
>>>
>>> filters: - runtime.powerState == "poweredOff" 
>>>
>>>
>>> i am using 
>>> ansible 2.9.10
>>>
>>>  
>>>
>>> On Friday, September 4, 2020 at 8:16:22 PM UTC-7 [email protected] 
>>> wrote:
>>>
>>>> tried but no luck 
>>>>
>>>>
>>>> plugin: community.vmware.vmware_vm_inventory
>>>> strict: False
>>>> hostname: xxx
>>>> username: [email protected]
>>>> password: xxx
>>>> validate_certs: False
>>>> #properties:
>>>> #- runtime.powerState
>>>> #- config.name
>>>> properties:
>>>> - 'name'
>>>> - 'config.uuid'
>>>> - 'config.name'
>>>> - 'guest.toolsStatus'
>>>> - 'guest.toolsRunningStatus'
>>>> - 'guest.ipAddress'
>>>> - 'configIssue'
>>>> - 'config.bootOptions'
>>>> - 'config.annotation'
>>>> - 'config.alternateGuestName'
>>>> compose:
>>>>   ansible_host: 'guest.ipAddress'
>>>> keyed_groups:
>>>>     - key: 'tags'
>>>>       separator: ''
>>>> filters:
>>>> - guest.GuestFullName == "CentOS 7 (64-bit)"
>>>>
>>>>
>>>>
>>>>
>>>> On Friday, September 4, 2020 at 12:21:46 PM UTC-7 [email protected] 
>>>> wrote:
>>>>
>>>>> @abijit reported  community.vmware.vmware_vm_inventory  but i did not 
>>>>> find doc about it ie what all capabilities its filter has 
>>>>>
>>>>>  
>>>>>
>>>>> On Friday, September 4, 2020 at 12:12:04 PM UTC-7 [email protected] 
>>>>> wrote:
>>>>>
>>>>>> Hi
>>>>>>
>>>>>> Needs any suggestion in my case as below 
>>>>>>
>>>>>> We have vCenter where many linux bases vm which are use by other lob, 
>>>>>> there is no proper naming standard , no ip based filter possible , no 
>>>>>> folders arranged properly 
>>>>>>
>>>>>> With all this, one thing which is in my control is add  "custom 
>>>>>> attributes"  
>>>>>>
>>>>>> Is there any way we can filter using "custom attributes' 
>>>>>>
>>>>>> Thanks 
>>>>>>
>>>>> -- 
>> 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].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/e9399bfb-3e24-4ab6-9fa5-46016a86a925n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/e9399bfb-3e24-4ab6-9fa5-46016a86a925n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> Thanks,
> Abhijeet Kasurde
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1268d7a3-fd28-4b89-9a91-2815e97a9ad7n%40googlegroups.com.

Reply via email to