Comments (5)
"Like a lot of people I've installed "passlib" but it was still not working. What did I do wrong? You have to install "passlib" on your local controller and not on remote host! Hope it could help someone else! " - stackoverflow
from ansible-node-exporter.
@lcrawfo Make sure you install passlib
on the machine/virtualenv you are running ansible from.
from ansible-node-exporter.
I had already installed passlib version 1.7.4 and it doesn't fix the issue
from ansible-node-exporter.
I have got the same issue. Target VM is Ubuntu 18.04. Here I installed pip, bcrypt, and debug password_hash:
- name: Test password_hash
hosts: all
become: true
tasks:
# node_exporter uses bcrypt to hash password so we install it
- name: Install python3-pip
package:
name: [ 'python3-dev', 'python3-pip' ]
state: present
- name: Ensure bcrypt support is installed
pip:
name: "passlib[bcrypt]"
- debug:
msg: "{{ 'secret' | password_hash('bcrypt') }}"
Got
[2022-02-24 16:32:24][0fe9e4cb054342fd896b65d4fbd68a01-Environment-20222402162630][install][NodeExporter]Ansible task output:
PLAY [Test password_hash] TASK [Ensure bcrypt support is installed]
changed: [80.158.56.17] => changed=true
cmd:
- /usr/bin/pip3
- install
- passlib[bcrypt]
invocation:
module_args:
chdir: null
editable: false
executable: null
extra_args: null
name:
- passlib[bcrypt]
requirements: null
state: present
umask: null
version: null
virtualenv: null
virtualenv_command: virtualenv
virtualenv_python: null
virtualenv_site_packages: false
name:
- passlib[bcrypt]
requirements: null
state: present
stderr: ''
stderr_lines: <omitted>
stdout: |-
Collecting passlib[bcrypt]
Downloading https://files.pythonhosted.org/packages/3b/a4/ab6b7589382ca3df236e03faa71deac88cae040af60c071a78d254a62172/passlib-1.7.4-py2.py3-none-any.whl (525kB)
Collecting bcrypt>=3.1.0; extra == "bcrypt" (from passlib[bcrypt])
Downloading https://files.pythonhosted.org/packages/52/a7/51ab6481ac355517696477889d8ab232106a0ddadda642c54e47a2ab40b9/bcrypt-3.2.0-cp36-abi3-manylinux1_x86_64.whl (63kB)
Requirement already satisfied: six>=1.4.1 in /usr/lib/python3/dist-packages (from bcrypt>=3.1.0; extra == "bcrypt"->passlib[bcrypt])
Collecting cffi>=1.1 (from bcrypt>=3.1.0; extra == "bcrypt"->passlib[bcrypt])
Downloading https://files.pythonhosted.org/packages/49/7b/449daf9cacfd7355cea1b4106d2be614315c29ac16567e01756167f6daab/cffi-1.15.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (405kB)
Collecting pycparser (from cffi>=1.1->bcrypt>=3.1.0; extra == "bcrypt"->passlib[bcrypt])
Downloading https://files.pythonhosted.org/packages/62/d5/5f610ebe421e85889f2e55e33b7f9a6795bd982198517d912eb1c76e1a53/pycparser-2.21-py2.py3-none-any.whl (118kB)
Installing collected packages: pycparser, cffi, bcrypt, passlib
Successfully installed bcrypt-3.2.0 cffi-1.15.0 passlib-1.7.4 pycparser-2.21
stdout_lines: <omitted>
version: null
virtualenv: null
[2022-02-24 16:32:24][0fe9e4cb054342fd896b65d4fbd68a01-Environment-20222402162630][install][NodeExporter]Ansible task output:
PLAY [Install node exporter] TASK [debug]
ok: [80.158.56.17] =>
msg: '*'
However, debug with python on the target machine showed that bcrypt works
$ sudo pip3 list | grep passlib
passlib (1.7.4)
$ sudo pip3 list | grep bcrypt
bcrypt (3.2.0)
$ /usr/bin/python3
Python 3.6.9 (default, Dec 8 2021, 21:08:43)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import passlib
>>> from passlib.hash import bcrypt
>>> bcrypt.hash('secret')
'$2b$12$MGasQXT20idV0lbDZsSVtO6h2fiTl68qFsw4owfPHVjvTmU02SCnq'
>>>
In general, if we have 50 VMs, do you think we need to install bcrypt
on all machines repeatedly to be able to use this role? Or it is better to allow users to input the password in the hash format?
from ansible-node-exporter.
This role has been deprecated in favor of a the prometheus-community/ansible collection.
from ansible-node-exporter.
Related Issues (20)
- 'latest' version doesn't work HOT 11
- node_exporter_textfile_dir doesn't enable corresponding collector HOT 1
- Unpack node_exporter binary step fails on cluster HOT 3
- With recent release of node_exporter (1.2.2) the role fails to detect version installed. HOT 7
- Unable to find required 'zipinfo' binary in the path HOT 2
- Allow to install node exporter easily without internet HOT 4
- Create password hash on local machine HOT 3
- new release? HOT 10
- Support for other RHEL-like packages HOT 1
- Refactor: Unnecessary call to github if node_exporter already installed HOT 1
- Still maintained? HOT 8
- tasks/main.yml wrong parameter in import_tasks: install.yml HOT 1
- Create a new release with changes in master branch HOT 4
- PreventHome works only if mount is directly under /home HOT 1
- Role doesn't work with Ansible 7.0.0 HOT 5
- Crash on get checksum list HOT 1
- Is ansible-node-exporter abandoned? No commits have been made since January 2022 (now December 2022) HOT 5
- Node exporter version 1.5.0 systemd unit unable to start HOT 2
- Example code in the README doesn't generate a CSR file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-node-exporter.