This repository was archived by the owner on Jun 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,6 @@ function install_terraform() {
1313 curl -fsS https://releases.hashicorp.com/terraform/0.11.14/terraform_0.11.14_linux_amd64.zip | gunzip > terraform && chmod +x terraform && sudo mv terraform /usr/bin
1414}
1515
16- function install_ansible() {
17- sudo apt-get update || true
18- sudo apt-get install -qq -y python-pip python-dev libffi-dev libssl-dev \
19- && pip install --user -U setuptools cffi \
20- && pip install --user ansible
21- }
22-
2316[ -n " $SECRET_KEY " ] || {
2417 echo " Cannot run smoke tests: no secret key"
2518 exit 1
@@ -28,7 +21,6 @@ function install_ansible() {
2821source " $SRCDIR /bin/circle-env"
2922
3023install_terraform
31- install_ansible
3224
3325# Only attempt to create GCP image in first container, wait for it to be created otherwise:
3426[ " $CIRCLE_NODE_INDEX " != " 0" ] && export CREATE_IMAGE=0
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ function print_vars() {
6666}
6767
6868function verify_dependencies() {
69- local deps=(python terraform ansible-playbook gcloud)
69+ local deps=(python terraform gcloud)
7070 for dep in " ${deps[@]} " ; do
7171 if [ ! " $( which " $dep " ) " ]; then
7272 echo >&2 " $dep is not installed or not in PATH."
@@ -141,9 +141,18 @@ function wait_for_image() {
141141 exit 1
142142}
143143
144+ function install_ansible() {
145+ sudo apt-get update || true
146+ sudo apt-get install -qq -y python-pip python-dev libffi-dev libssl-dev \
147+ && pip install --user -U setuptools cffi \
148+ && pip install --user ansible
149+ }
150+
144151# shellcheck disable=SC2155
145152function create_image() {
146153 if [[ " $CREATE_IMAGE " == 1 ]]; then
154+ install_ansible
155+
147156 greenly echo " > Creating GCP image $IMAGE_NAME ..."
148157 local begin_img=$( date +%s)
149158 local num_hosts=1
You can’t perform that action at this time.
0 commit comments