cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use Ansible to change hostgroup information

Chayaphot
Observer

Because wanting to change host groups for several hosts at once. Can we use Ansible to help change it?

If possible, please share the playbook and how to.

7 REPLIES 7

radek_jasinski
DynaMight Guru
DynaMight Guru

Hi,

As much as possible you can use Ansible for this. I don't have the playbooks ready. However, use OneAgent CLI (https://www.dynatrace.com/support/help/shortlink/oneagentctl#host-groups) to create and manage host groups.

Remember that you can set the host group at installation or change it using the CLI. There is no other option.

Radek

Have a nice day!

Hi @radek_jasinski  & @Chayaphot , 

You can utilize Remote configuration management using UI

Yosi_Neuman_0-1679422040955.png

HTH

Yos 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

Thanks, I didn't notice that Dynatrace added this feature.
This will be useful, but if you need to add 100 agents to a host group, it will be cumbersome.

CLI is the best at this point.

Radek

Have a nice day!

Not quite agree with you @radek_jasinski, you can filter the oneagent deployment (let's say by tag) and then switch on the check box for all the hosts and you are all set.

If you have a tool to run the CLI on 100 hosts go for it!

Yos

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

I agree with you:) 

Have a nice day!

Hi @radek_jasinski and @Yosi_Neuman 

I understand it's much easier to edit via the web, just tick a checkbox. But the dynatrace version of the customer is very old. Therefore, only about 70 out of 200 devices can use that feature.

If using the CLI, it should take quite a long time. If you have a more convenient way, please suggest.

Chayaphot

I think we have described with Yosi all the possibilities of host group configuration.

 

Radek

Have a nice day!

Featured Posts