From 817cc1463a60d05fe57bf7869cf9469efda7275c Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Tue, 9 Jan 2018 01:52:05 +0000 Subject: [PATCH] Revert "Bootstrap Ansible if not available" This is not actually necessary. We need Ansible in the VM that's running the test not the VM being built. Which means the VM attached in to Jenkins needs to have Ansible installed in the first place. We just need to ensure that Jenkins is initially configured with one (which we currently have to do anyway even for the regular shell script provisioner). This reverts commit 99f875674576f3643c9713750a7017f581ff758b. Change-Id: I607526f4f6575e2a29c7184e0196e9c92040afd9 Signed-off-by: Thanh Ha --- provision/install-ansible.sh | 24 ------------------------ templates/builder.json.example | 1 - templates/docker.json.example | 1 - 3 files changed, 26 deletions(-) delete mode 100644 provision/install-ansible.sh diff --git a/provision/install-ansible.sh b/provision/install-ansible.sh deleted file mode 100644 index 12541c7..0000000 --- a/provision/install-ansible.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: EPL-1.0 -############################################################################## -# Copyright (c) 2018 The Linux Foundation and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -############################################################################## -# vi: ts=4 sw=4 sts=4 et : - -# Packer Ansible provisioner needs Ansible installed so bootstrap if necessary -if ! command -v /usr/bin/ansible-playbook; then - if command -v apt; then - apt -y update - apt install -y software-properties-common - apt-add-repository -y ppa:ansible/ansible - apt install -y ansible - fi - if command -v yum; then - yum install -y ansible - fi -fi diff --git a/templates/builder.json.example b/templates/builder.json.example index de57570..c0c194d 100644 --- a/templates/builder.json.example +++ b/templates/builder.json.example @@ -40,7 +40,6 @@ { "type": "shell", "scripts": [ - "common-packer/provision/install-ansible.sh", "common-packer/provision/install-python.sh" ], "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi" diff --git a/templates/docker.json.example b/templates/docker.json.example index be38e8c..6e92844 100644 --- a/templates/docker.json.example +++ b/templates/docker.json.example @@ -40,7 +40,6 @@ { "type": "shell", "scripts": [ - "common-packer/provision/install-ansible.sh", "common-packer/provision/install-python.sh" ], "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi" -- 2.16.6