GithubHelp home page GithubHelp logo

fatmcgav / packer-provisioner-inspec Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jrbeilke/packer-provisioner-inspec

0.0 1.0 0.0 37 KB

Packer plugin to add InSpec as a provisioner

Makefile 4.04% Go 95.90% Shell 0.06%

packer-provisioner-inspec's Introduction

Packer InSpec Provisioner

Build Status

packer-provisioner-inspec is a Packer plugin that tests machines during provisioning using InSpec.

Install

Build and install the plugin (you'll need git and go):

make install

Usage

Add the provisioner to your packer template:

{
  "variables": {
    "version":  "0.1",
    "box_name": "test-project"
  },
  "builders": [ ... ],
  "provisioners": [{
    "type": "inspec",
    "test_path": "inspec/example.rb"
  }]
}

The connection to the images being built is facilitated via a local SSH proxy that InSpec connects to.

Configuration Reference

required parameters

  • test_path - The relative path to the InSpec test file or profile to be utilized.

optional parameters

  • extra_arguments (array of strings) - An array of extra arguments to pass to the inspec command. By default, this is empty. These arguments will be passed through a shell and arguments should be quoted accordingly. Usage example: "extra_arguments": ["--sudo", "--no-distinct-exit"]
  • local_port (string) - The port on which inspec-provisioner should first attempt to listen for SSH connections. This value is a starting point. inspec-provisioner will attempt listen for SSH connections on the first available of ten ports, starting at local_port. When local_port is missing or empty, inspec-provisioner will listen on a system-chosen port.
  • sftp_command (string) - The command to run on the machine to handle the SFTP protocol that InSpec will use to transfer files. The command should read and write on stdin and stdout, respectively. Defaults to /usr/lib/sftp-server -e.
  • ssh_host_key_file - The SSH key that will be used to run the SSH server to which InSpec connects.
  • ssh_authorized_key_file - The SSH public key of the InSpec ssh_user.

packer-provisioner-inspec's People

Contributors

jrbeilke avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.