inspec/docs/resources/sys_info.md.erb
hannah-radish 9cfc86d2ab Resource documentation update (#2207)
Light formatting changes, change order of example and matchers, slight
color changes

Signed-off-by: hannah-radish <hmaddy@chef.io>
2017-10-03 17:35:10 -04:00

41 lines
910 B
Text

---
title: About the sys_info Resource
---
# sys_info
Use the `sys_info` InSpec audit resource to test for operating system properties for the named host, and then returns that info as standard output.
<br>
## 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 InSpec audit resource.
### Get system information for example.com
describe sys_info do
its('hostname') { should eq 'example.com' }
end
<br>
## Matchers
This InSpec audit resource has the following 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' }