Use python3 to build venv
Remove obsolete pw crypt targets
Change-Id: Iae8b9b1b883a0737093d1bd5f14b96039d373a50
diff --git a/Makefile b/Makefile
index 8ba4395..8619e8c 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@
SHELL = bash -e -o pipefail
# tooling
-VIRTUALENV ?= python -m venv
+VIRTUALENV ?= python3 -m venv
# ansible files is all top-level playbooks
ANSIBLE_PLAYBOOKS ?= $(wildcard *.yml)
@@ -77,24 +77,6 @@
black --version ;\
black $(PYTHON_FILES)
-# Password generation for use with ansible
-# from: https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-generate-encrypted-passwords-for-the-user-module
-# Ref on supported crypt types per OS: https://passlib.readthedocs.io/en/stable/modular_crypt_format.html#os-defined-hashes
-
-# sha512 linux passwords
-sha512_passwd: $(VENV_NAME)
- source ./$</bin/activate ; set -u ;\
- python -c "from passlib.hash import sha512_crypt; import getpass; print(sha512_crypt.using(rounds=5000).hash(getpass.getpass()))"
-
-# bcrypt openbsd passwords, per https://man.openbsd.org/crypt.3
-bcrypt_passwd: $(VENV_NAME)
- source ./$</bin/activate ; set -u ;\
- python -c "from passlib.hash import bcrypt; import getpass; print(bcrypt.using(rounds=8).hash(getpass.getpass()))"
-
-passwd: $(VENV_NAME) ## encrypt a password using required formats
- source ./$</bin/activate ; set -u ;\
- python -c "from passlib.hash import bcrypt,sha512_crypt; import getpass; pw=getpass.getpass(); print('bcrypt: %s\nsha512crypt: %s' % (bcrypt.using(rounds=8).hash(pw), sha512_crypt.using(rounds=5000).hash(pw)))"
-
clean:
rm -rf $(VENV_NAME) ansible_collections