No commit activity in last 3 years
No release in over 3 years
A knife plugin to compare two runlists, expand them to lists of recipes and display the diff
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 11.0.0
~> 3.0.5
 Project Readme

Knife Runlist Compare

Knife Runlist Compare is is a Knife plugin which allows you, as the name suggests, to compare two Chef run_lists. It takes each run_list it is given, expands them into the list of recipes which would be executed on a node, and produces a diff of the differences between those recipe lists.

Gem Version

Installation

Gem Install

knife-runlist-compare is available on rubygems. Add the following to your Gemfile:

gem 'knife-runlist-compare'

or install the gem manually:

gem install knife-runlist-compare

Usage

knife runlist compare RUNLIST_1 RUNLIST_2 (options)

Supported Options

Environment

The environment option allows you to specify the Chef environment to be used in the run_list expansion process (defaults to production)

-e ENV_NAME
--environment ENV_NAME

Data Source

The datasource option allows you to specify whether to use the Chef Server (server) or local disk (disk) to load roles and recipes for run_list expansion

-d DATA_SOURCE
--data-source DATA_SOURCE

Context Lines

The context_lines option allows you to specify the number of lines of context to be shown around each item in the diff output (defaults to 10000)

-U CONTEXT_LINES
--context-lines CONTEXT_LINES

Usage Example

$ knife runlist compare 'role[Base]' 'role[NewBase]' -U 3
run_list role[Base] expands to the following recipes:
["foo", "bar::baz"]

run_list role[NewBase] expands to the following recipes:
["foo"]

The following is the diff of these run_lists:
 foo
-bar::baz