fix: node_exporter preflight checks ssl key as ansible user - #821
fix: node_exporter preflight checks ssl key as ansible user#821epruesse wants to merge 1 commit into
Conversation
Run stat on tls key file as node_exporter_system_user since this file may not be accessible to the regular ansible user. Signed-off-by: Elmar Pruesse <epruesse@users.noreply.github.com>
|
I'm not sure why the tests are failing. Is this expected, or an issue with the test system? |
The tests are failing because the service user does not exist yet. The user is created during the installation step of the role, which runs after the preflight checks. The reason this only shows up in the That said, I think the general idea is a good one. We should verify that the service user can actually access the certificate and key, and ideally this is something we should check consistently across all roles that support TLS. Maybe the simplest fix here would be to run the certificate/key |
The node_exporter TLS certificate private key file may not be readable by the ansible user. The current preflight fails if this is the case. The PR makes the stat call run as the node_exporter_system_user.