chef / 17.9.18 / inspec / resources / cassandradb_conf / index.html /

cassandradb_conf resource

[edit on GitHub]

Use the cassandradb_conf Chef InSpec audit resource to test the configuration of a Cassandra database, which is typically located at $CASSANDRA_HOME/cassandra.yaml or $CASSANDRA_HOME\conf\cassandra.yaml depending upon the platform.

Installation

This resource is distributed along with Chef InSpec itself. You can use it automatically.

Requirements

  • The value of the CASSANDRA_HOME environment variable must be set in the system.

Syntax

A cassandradb_conf resource block fetches configurations in the cassandra.yaml file, and then compares them with the value stated in the test:

describe cassandradb_conf do
  its('config item') { should eq 'value' }
end

Examples

The following examples show how to use this Chef InSpec audit resource.

Test parameters set within the configuration file

describe cassandradb_conf do
  its('listen_address') { should eq 'localhost' }
  its('num_tokens') { should eq 16 }
end

Matchers

For a full list of available matchers, please visit our matchers page.

© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/inspec/resources/cassandradb_conf/