From 607e2b2d4017b545e6a568b3fffbd4d48cbd3c78 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Mon, 18 Jul 2022 10:45:50 +0100 Subject: [PATCH] Handle tls-ca-bundle.pem if it exists --- ansible-setup.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ansible-setup.sh b/ansible-setup.sh index 52e3707..e051240 100755 --- a/ansible-setup.sh +++ b/ansible-setup.sh @@ -32,7 +32,12 @@ echo "Install path: $install_path" echo "Bin path: $bin_path" pipinstall () { - ./bin/pip install --upgrade $1 + if [ -r /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem ]; then + cafile="--cert /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" + else + cafile="" + fi + ./bin/pip $cafile install --upgrade $1 } create_link () {