From 5b15ad988124c7d94617fd736a8e2a9f2df8eed6 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Mon, 28 Sep 2020 17:57:53 -0500 Subject: [PATCH] Fix SSL: CERTIFICATE_VERIFY_FAILED issue with Galaxy when running tests. --- .travis.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a089875..cf64143 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,19 @@ matrix: osx_image: xcode11.3 before_install: + # Install role dependencies. Do this here, using newer OpenSSL version and a + # virtualenv because older macOS versions will fail with the system version of + # OpenSSL and Python if done later. + - brew upgrade openssl || brew install openssl || true + - brew upgrade python3 || brew install python3 || true + - sudo -H pip3 install -U virtualenv + - virtualenv --python=/usr/local/bin/python3 .venv + - source .venv/bin/activate + - pip3 install ansible + - python -c "import ssl; print(ssl.OPENSSL_VERSION)" + - ansible-galaxy install -r requirements.yml -p ./roles + - deactivate + # Uninstall existing Homebrew installation. - curl -sLO https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh - chmod +x ./uninstall.sh @@ -40,9 +53,6 @@ install: - "echo -e '[local]\nlocalhost ansible_connection=local' | sudo tee -a /etc/ansible/hosts > /dev/null" script: - # Install dependencies. - - "ansible-galaxy install -r requirements.yml" - # Check the role/playbook's syntax. - "ansible-playbook main.yml --syntax-check"