Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions docs-chef-io/content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
+++
title = "About the Chef InSpec RabbitMQ resource pack"
draft = false
linkTitle = "RabbitMQ resource pack"
summary = "Chef InSpec resources for auditing RabbitMQ."

[cascade]
[cascade.params]
platform = "rabbitmq"

[menu.rabbitmq]
title = "About RabbitMQ resources"
identifier = "inspec/resources/rabbitmq/about"
parent = "inspec/resources/rabbitmq"
weight = 10
+++

The Chef InSpec RabbitMQ resources allow you to audit a RabbitMQ cluster.

## Support

The InSpec RabbitMQ resources were part of InSpec core through InSpec 6.
Starting in InSpec 7, they're released separately as a Ruby gem.

## Usage

To add this resource pack to an InSpec profile, add the `inspec-rabbitmq-resources` gem as a dependency in your `inspec.yml` file:

```yaml
depends:
- name: inspec-rabbitmq-resources
gem: inspec-rabbitmq-resources
```

## RabbitMQ resources

{{< inspec_resources_filter >}}

The following Chef InSpec RabbitMQ resources are available in this resource pack.

{{< inspec_resources section="rabbitmq" platform="rabbitmq" >}}
Original file line number Diff line number Diff line change
@@ -1,35 +1,24 @@
+++
title = "rabbitmq_config resource"
draft = false
gh_repo = "inspec"
platform = "linux"

[menu]
[menu.inspec]
[menu.rabbitmq]
title = "rabbitmq_config"
identifier = "inspec/resources/os/rabbitmq_config.md rabbitmq_config resource"
parent = "inspec/resources/os"
identifier = "inspec/resources/rabbitmq/rabbitmq_config.md rabbitmq_config resource"
parent = "inspec/resources/rabbitmq"
+++

Use the `rabbitmq_config` Chef InSpec audit resource to test configuration data for the RabbitMQ daemon located at `/etc/rabbitmq/rabbitmq.config` on Linux and Unix platforms.

## Availability

### Install

{{< readfile file="content/inspec/reusable/md/inspec_installation.md" >}}

### Version

This resource first became available in v1.20.0 of InSpec.

## Syntax

A `rabbitmq_config` resource block declares the RabbitMQ configuration data to be tested:

describe rabbitmq_config.params('rabbit', 'ssl_listeners') do
it { should cmp 5671 }
end
```ruby
describe rabbitmq_config.params('rabbit', 'ssl_listeners') do
it { should cmp 5671 }
end
```

where

Expand All @@ -40,11 +29,13 @@ where

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

### Test the list of TCP listeners
Test the list of TCP listeners:

describe rabbitmq_config.params('rabbit', 'tcp_listeners') do
it { should eq [5672] }
end
```ruby
describe rabbitmq_config.params('rabbit', 'tcp_listeners') do
it { should eq [5672] }
end
```

## Matchers

Expand Down