NETWAYS / ansible-collection-elasticstack

A collection to install and manage the Elastic Stack
GNU General Public License v3.0
9 stars 8 forks source link

[Bug]: Forcfully enabling repository breaks install task on some systems #312

Closed widhalmt closed 4 months ago

widhalmt commented 5 months ago

Please try to fill out as much of the information below as you can. Thank you!

Which version contains the bug?

No response

Describe the bug

We have a mandatory enable_repo in the Logstash RedHat installation task file. This is fine when you use the included repo role. But if you have e.g. RedHat Satellite to manage your repositories you might not have a repository with this exact name. So the install task breaks.

So either we make this task into two different ones or we remove the "enable_repo part and find another way to satisfy users who want to disable the repository in case they would accidentally update.

How to recreate the bug?

widhalmt commented 5 months ago

The same is true for other packages. e.g. filebeat.

widhalmt commented 4 months ago

One approach could be to check for elasticstack_full_stack: true . If it's true we rely on the repositories being managed by our repos role. If not, we can't use the enablerepo option because we don't know how the repository is named.