You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the tags to only perform promtail installation, without having the defined systemd service enabled or started
(using promtail_install tags).
The problem is, that the tasks responsible for defining the systemd service and promtail config (that are tagged by promtail_install) notify a handler, that enables and (re)starts the service (regardless of being tagged).
Looks like this is a current ansible limitation.
The workaround might be to use when clauses around the tasks and handler that would check some variable, e.g. promtail_service_start
my use case:
I'm including this role in a play, that creates an OSP instance image. I need the promtail to be ready but not started/enabled, as users will pass their custom enable_promtail flag together with their own scrape configs.
The text was updated successfully, but these errors were encountered:
I've been thinking through this - especially in terms of using the role in the build process of VM images. Your proposal makes sense - would you be up for creating a PR.
It would be great, if you could create a test-case in https://github.com/patrickjahns/ansible-role-promtail/tree/master/molecule so that your scenario run is covered in the future
Hi,
thank you for considering this. Unfortunately my time to work on this is quite limited, I had to provide a solution in our project, so I actually decided to write my own, separate roles to handle this (install, deploy).
I can't promise anything, but I'll try to get something together (after I do a bit of studying around molecule).
I'm trying to use the tags to only perform promtail installation, without having the defined systemd service enabled or started
(using
promtail_install
tags).The problem is, that the tasks responsible for defining the systemd service and promtail config (that are tagged by
promtail_install
) notify a handler, that enables and (re)starts the service (regardless of being tagged).Looks like this is a current ansible limitation.
The workaround might be to use
when
clauses around the tasks and handler that would check some variable, e.g.promtail_service_start
my use case:
I'm including this role in a play, that creates an OSP instance image. I need the promtail to be ready but not started/enabled, as users will pass their custom
enable_promtail
flag together with their own scrape configs.The text was updated successfully, but these errors were encountered: