guillaumewatteeux / ansible-centreon

Ansible modules for CLAPI REST (Centreon API)
GNU General Public License v3.0
10 stars 12 forks source link

Centreon' object has no attribute host_list' #9

Open natman opened 5 years ago

natman commented 5 years ago

Hello I can add/delete a host, but when changing status to disabled, I first get issue "Centreon' object has no attribute host_list". So into centreon_host.py, I change the syntax to host.list(), but this time the issue is "'unicode' object has no attribute 'name'" Thank you for your help.

guillaumewatteeux commented 5 years ago

Hi,

Witch branch ?

I works on dev branch with new centreonapi version. Could you try with this environment ?

natman commented 5 years ago

So... I gave a try to many combinations but no one works, I may misunderstood. I'm pretty sure you're talking about the dev branch ansible-centreon, but what about the centreonapi repo? Should I use your own forked repo, or the official centreon one? And with which branch?

Our centreon production is not a https one, so the only way I found to make your centreon_host module (present/absent state only ) work is to use the eaa757898e32450510b8460ccd481be3c61c186c branch of your forked centreonapi with the master branch of ansible-centreon.

Tell me which kind of branch I should use with a http connection to centreon and I will perform the test and will give you the result.

guillaumewatteeux commented 5 years ago

Hi,

I'm works on both projects. Fork from centreonapi is temporary. I'll merge my stuff after beta test period. (join slack #centreon-iac) For Ansible modules (and roles). I'm works on dev branch before release a stable version.

Ansible modules on master branch not work with current centreonapi package (>0.1.3)

natman commented 5 years ago

okay, so, for a 3.4 centreon, the good combination for make all modules work with an http connection is:

All work as expected, and it is a very useful stuff for all-in-one playbook automation, from vm creation to monitoring.

none of other branches combinations work.

I'll next install a 18.10 vm to give a try.