Skip to content

ssplatt/infratest-formula

Repository files navigation

infratest-formula

Build Status

A Salt formula to install and configure the infratest module.

This formula was initialized with Saltscaffold.

asciicast

Default configuration

By default, the formula is disabled. When enabled, it will install git, python-pip, and testinfra as dependencies for pulling the infratest module down from Github and loading it into Salt.

# infratest/defaults.yml
infratest:
  enabled: false
  run_all: false
  mockup:
    enabled: true
    deps:
      - git
      - python-pip
  install:
    git: true
    pkg: infratest # should a package be available in the future
    url: https://github.com/ssplatt/saltstack-infratest-module.git
    target: /srv/salt/_modules
    branch: master
    user: root
    deps:
      from_pip: true
      pkgs:
        - testinfra

Development and Testing

Ensure Vagrant, Ruby, and Ruby Gems packages are installed.

(Mac) Install and setup brew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install cask
brew cask install vagrant
cd <formula dir>
bundle install

or

sudo gem install test-kitchen
sudo gem install kitchen-vagrant
sudo gem install kitchen-salt

Run a converge on the default configuration:

kitchen converge

Test in the Cloud

Instead of running on a VM locally using Vagrant, you can test the formula on a cloud provider, like Linode. The settings are configured in the .kitchen-ci.yml file.

See the kitchen-linode repository for more details.

About

salt formula for the infratest module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published