inspec/docs/resources/sys_info.md.erb
Eike Waldt 2a775ca6b7
indent all code samples in docs/resources/sys_info.md.erb
Signed-off-by: Eike Waldt <waldt@b1-systems.de>
2019-07-16 21:02:52 +02:00

64 lines
1.3 KiB
Text

---
title: About the sys_info Resource
platform: os
---
# sys_info
Use the `sys_info` Chef InSpec audit resource to test for operating system properties for the named host, and then returns that info as standard output.
<br>
## Availability
### Installation
This resource is distributed along with Chef InSpec itself. You can use it automatically.
### Version
This resource first became available in v1.0.0 of InSpec.
## Syntax
An `sys_info` resource block declares the hostname to be tested:
describe sys_info do
its('hostname') { should eq 'value' }
end
<br>
## Examples
The following examples show how to use this Chef InSpec audit resource.
### Get system information for example.com
describe sys_info do
its('hostname') { should eq 'example.com' }
end
<br>
## Matchers
For a full list of available matchers, please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
### hostname
The `hostname` matcher tests the host for which standard output is returned:
its('hostname') { should eq 'value' }
### manufacturer
The `manufacturer` matcher tests the host for which standard output is returned:
its('manufacturer') { should eq 'value' }
### model
The `model` matcher tests the host for which standard output is returned:
its('model') { should eq 'value' }