mirror of
https://github.com/inspec/inspec
synced 2024-11-24 05:33:17 +00:00
9cfc86d2ab
Light formatting changes, change order of example and matchers, slight color changes Signed-off-by: hannah-radish <hmaddy@chef.io>
40 lines
1 KiB
Text
40 lines
1 KiB
Text
---
|
|
title: About the rabbitmq_config Resource
|
|
---
|
|
|
|
# rabbitmq_config
|
|
|
|
Use the `rabbitmq_config` InSpec audit resource to test configuration data for the RabbitMQ daemon located at `/etc/rabbitmq/rabbitmq.config` on Linux and Unix platforms.
|
|
|
|
<br>
|
|
|
|
## 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
|
|
|
|
where
|
|
|
|
* `params` is the list of parameters configured in the RabbitMQ config file
|
|
* `{ should cmp 5671 }` tests the value of `rabbit.ssl_listeners` as read from `rabbitmq.config` versus the value declared in the test
|
|
|
|
<br>
|
|
|
|
## Examples
|
|
|
|
The following examples show how to use this InSpec audit resource.
|
|
|
|
### Test the list of TCP listeners
|
|
|
|
describe rabbitmq_config.params('rabbit', 'tcp_listeners') do
|
|
it { should eq [5672] }
|
|
end
|
|
|
|
<br>
|
|
|
|
## Matchers
|
|
|
|
For a full list of available matchers please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
|