cloudalchemy / ansible-node-exporter

Provision basic metrics exporter for prometheus monitoring tool
MIT License
500 stars 272 forks source link

Create password hash on local machine #256

Closed sfischme closed 1 year ago

sfischme commented 2 years ago

What is missing?

Instead of executing bcrypt on the remote machine, execute it on the local machine and transmit the password as a variable.

Why do we need it?

Not all remote machines have python installed. Even less have bcrypt. Some have old versions of python.

Environment Various flavours of Linux.

Anything else we need to know?:

As alternative, let me run bcrypt on the password locally and put the hashed output into the playbook with node_exporter_basic_auth_user not bcrypting the password again.

sdarwin commented 2 years ago

Not all remote machines have python installed.

wait. ...

Are you proposing to run Ansible without python?

In terms of ansible, this is almost like says "Not all remote machines have ssh installed.". Which means, you have to fix that, and cannot proceed otherwise.

sfischme commented 2 years ago

Even with python, we would also need bcrypt (and pip) just to generate the hash for the password. It would be easier to not have to create the hash on the target machine.

SuperQ commented 1 year ago

This role has been deprecated in favor of a the prometheus-community/ansible collection.