From 4723f776066fd3cb8761eed9dd2ce43b4fb556f1 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Wed, 26 May 2021 15:39:56 +0100 Subject: [PATCH] Check for python3-venv module --- ansible-setup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ansible-setup.sh b/ansible-setup.sh index 4257587..060680c 100755 --- a/ansible-setup.sh +++ b/ansible-setup.sh @@ -38,6 +38,11 @@ else echo "python3 found: $py3cmd" fi +if ! $($py3cmd -c "import venv"); then + echo "Python 3 venv module missing. Try installing python3-venv package." + exit 1 +fi + if [ ! -d "$install_path" ]; then python3 -m venv "$install_path" || exit 1 fi