# hcloud plugin - working with dynamic inventory

**URL:** <https://forum.ansible.com/t/hcloud-plugin-working-with-dynamic-inventory/31118>\
**Category:** Ansible Project\
**Created:** [August 24, 2019, 10:36am UTC](https://forum.ansible.com/t/hcloud-plugin-working-with-dynamic-inventory/31118 "2019-08-24T10:36:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexey\_Lesovsky](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Alexey\_Lesovsky](https://forum.ansible.com/u/Alexey_Lesovsky)\
**Post date:** [August 24, 2019, 10:36am UTC](https://forum.ansible.com/t/hcloud-plugin-working-with-dynamic-inventory/31118/1 "2019-08-24T10:36:06Z")

</div>

Hi,

Trying to create a dynamic inventory using hcloud plugin and have some issues.  
Hetzner servers might have user-defined labels and I’m trying to define servers into groups using labels.

As I can see my test server has labels:  
$ hcloud server list -o columns=name,status,labels  
NAME STATUS LABELS  
node1 running group=common

Next using the following yml.  
plugin: hcloud  
groups:  
common: “‘common’ in labels”

But ansible-inventory doesn’t place host into defined group:  
$ ansible-inventory -i inventory\_hcloud.yml --graph  
@all:

> –@hcloud:
> 
> > –node1  
> > –@ungrouped:

Even more, when I modify expression to ‘labels is not defined’, my host is placed into the group and I suspect that module loss labels.

Is it a bug, or wrong yml? Any help appreciated.
