Question

ansible tower auto discovery plugin

  • 26 September 2022
  • 4 replies
  • 50 views

Badge +4

Hello,

I’ve tried the ansible tower plugin (22.07.5) to discover some hosts.

The scan successfully ends up with this kind of json output:

{  "type": "host",  "inventory_name": "[Dynamic] VMS",  "name": "acore",  "inventory_id": 19,  "description": "imported",  "id": "2811",  "enabled": true,  "groups": [    {      "name": "status_up",      "id": 358    },    {      "name": "cluster_Infra",      "id": 388    },    {      "id": 574,      "name": "tag_infra_vms"    },    {      "name": "os_rhel_8x64",      "id": 587    }  ]}

Now I want to add a mappers that applies (creates) a host group 'os_rhel_8x64’when the group.name is “os_rhel_8x64’ but I can’t find any discovery.results.groups item in the menu. I tried to manually fill it like discovery.results.groups.name but it doesn’t work.

I suppose the plugin is not totally operationnal and needs some additionnal improvment.

Is there a workaround to do so?


4 replies

Userlevel 6
Badge +16

Hi, 


Yes you’re right, we now have a feature in the Host Discovery module to leverage this kind of data structure.


I’ll add this to our backlog. Unfortunately, nothing to do to get around this. ​​​​​​​


Are you using an online (you don’t install centreon-pack* packages) or offline (you do have centreon-pack* package on your central server) license ​​​​? 

Userlevel 6
Badge +16

Ok, didn’t see the forum you were posting from. Ignore my last question. 

 

It will be available next month.

Badge +4

Hi, I just upgraded to 22.10 and I still can’t use groups[].name in the discovery “host group” rule. I may miss something.

Userlevel 3
Badge +11

Hi @digitall.finger

Sorry, we couldn’t manage to release it last month. It should be part of one of our next Plugin Pack releases (there’s one each month). Stay tuned!

Reply