Move Molecule Vagrant tests over to QEmu runners on Linux boxes "Dog-food" the Vagrant VMs Accelerate linting of Ansible code as well
40 lines
1.4 KiB
YAML
40 lines
1.4 KiB
YAML
name: Install Packer
|
|
description: Installs the packerio executable and its attendant tools to /usr/local/bin
|
|
for Ubuntu hosts
|
|
inputs:
|
|
version:
|
|
description: Version of Packer to install
|
|
required: true
|
|
default: "1.8.0"
|
|
pup_version:
|
|
description: Version of Pup to install
|
|
required: true
|
|
default: "v0.4.0"
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Install Packer and deps in Linux
|
|
shell: bash
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
set -exo pipefail
|
|
# Install virtualbox
|
|
sudo apt-get update
|
|
# Install QEmu, etc
|
|
sudo apt-get install -y unzip python3-{virtualenv,yaml} cloud-utils xorriso qemu-system-{x86,ppc} vagrant
|
|
# Install packer.io
|
|
curl -O https://releases.hashicorp.com/packer/${{ inputs.version }}/packer_${{ inputs.version }}_linux_amd64.zip
|
|
unzip -o packer_${{ inputs.version }}_linux_amd64.zip -d /usr/local/bin
|
|
chmod +x /usr/local/bin/packer
|
|
# Install pup
|
|
curl -L -o pup.zip "https://github.com/ericchiang/pup/releases/download/${{ inputs.pup_version }}/pup_${{ inputs.pup_version }}_linux_amd64.zip"
|
|
sudo unzip pup.zip -d /usr/local/bin
|
|
sudo chmod +x /usr/local/bin/pup
|
|
- name: Install Packer's deps in macOS
|
|
shell: bash
|
|
if: runner.os == 'macOS'
|
|
run: |
|
|
set -exo pipefail
|
|
brew install pup dvdrtools xorriso coreutils gsed virtualbox vagrant
|
|
# Packer is already installed
|