Revert "Bootstrap Ansible if not available" 04/8304/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Jan 2018 01:52:05 +0000 (01:52 +0000)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Jan 2018 17:16:08 +0000 (12:16 -0500)
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 <thanh.ha@linuxfoundation.org>
provision/install-ansible.sh [deleted file]
templates/builder.json.example
templates/docker.json.example

diff --git a/provision/install-ansible.sh b/provision/install-ansible.sh
deleted file mode 100644 (file)
index 12541c7..0000000
+++ /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
index de57570..c0c194d 100644 (file)
@@ -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"
index be38e8c..6e92844 100644 (file)
@@ -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"