Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

Latest commit

 

History

History

puppet

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

kitchen puppet

kitchen-puppet-example for testing puppet using test kitchen and Inspec.

This demonstration sets up an SSH server on a Vagrant instance running on your local machine.

Workstation Software Installation

  1. Have ruby installed, you'll need that - see the main README for RVM instructions.
  2. Have vagrant installed and in the PATH.
  3. Have virtualbox installed.
  4. Run the following commands:
gem install bundler
bundle
bundle exec kitchen list

This will return a list of the instances you can test on using test-kitchen if everything is correctly installed. You can use test-kitchen to create an instance, converge it with puppet, and test that puppet configured the instance properly using Inspec:

bundle exec kitchen create default-ubuntu-1604
bundle exec kitchen converge default-ubuntu-1604
bundle exec kitchen verify default-ubuntu-1604

The kitchen test command does this all, then destroys the instance:

bundle exec kitchen test default-ubuntu-1604

notes

This uses https://github.com/chef/inspec/tree/master/examples/kitchen-puppet mostly unmodified (once inspec/inspec#2972 gets merged)