inspec/docs/resources/windows_hotfix.md.erb
Nathen Harvey 65589f8f78 Markdown titles sometimes need _s escaped (#2451)
When a header includes two `_`s, they must be escaped, otherwise, the
text between the two `_`s is rendered with emphasis.  E.g.,

`<h1 id="etchostsallow">etc<em>hosts</em>allow</h1>`

Escaping the `_`s fixes this and the header is rendered properly.

This is a fix for:

* etc_hosts_allow
* etc_hosts_deny
* postgres_hba_conf
* postgres_ident_conf

This change also adds the `h1` title to the windows_hotfix resource
page.

Signed-off-by: Nathen Harvey <nharvey@chef.io>
2018-01-08 13:09:13 -05:00

52 lines
1.1 KiB
Text

---
title: About the windows_hotfix Resource
---
# windows_hotfix
Use the `windows_hotfix` InSpec audit resource to test if the hotfix has been installed on a Windows system.
<br>
## Syntax
A `windows_hotfix` resource block declares a hotfix to validate:
describe windows_hotfix('name') do
it { should be_installed }
end
where
* `('name')` must specify the name of a hotfix, such as `'KB4012213'`
* `be_installed` is a valid matcher for this resource
<br>
## Examples
The following examples show how to use this InSpec audit resource.
### Test if KB4012213 is installed
describe windows_hotfix('KB4012213') do
it { should be_installed }
end
### Test that a hotfix is not installed
describe windows_hotfix('KB9999999') do
it { should_not be_installed }
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/).
### be_installed
The `be_installed` matcher tests if the named hotfix is installed on the system:
it { should be_installed }