-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdoc_template.erb
More file actions
78 lines (49 loc) · 1.56 KB
/
doc_template.erb
File metadata and controls
78 lines (49 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
title: About the <%=vars['resource_name']%> Resource
---
# <%=vars['resource_name']%>
ADD_DESCRIPTION
<br>
## Syntax
ADD_DESCRIPTION
# Find a CHANGEME by name
describe <%=vars['resource_name']%>('<%=vars['assert_param']%>') do
it { should exist }
end
# Hash syntax for CHANGEME name
describe <%=vars['resource_name']%>(<%=vars['param_name']%>: '<%=vars['assert_param']%>') do
it { should exist }
end
<br>
## Examples
The following examples show how to use this InSpec audit resource.
### ADD_DESCRIPTION
describe <%=vars['resource_name']%>('<%=vars['assert_param']%>') do
it { should exist }
end
### ADD_DESCRIPTION
describe <%=vars['resource_name']%>('<%=vars['assert_param']%>') do
it { should CHANGEME }
end
### ADD_DESCRIPTION
describe <%=vars['resource_name']%>('<%=vars['assert_param']%>') do
it { should CHANGEME }
end
<br>
## Properties
<% vars['properties'].each do |property| %>
### <%=property%>
ADD_DESCRIPTION
describe <%=vars['resource_name']%>('<%=vars['assert_param']%>') do
its('<%=property%>') { should cmp "CHANGEME" }
end
<% end %>
## Matchers
This InSpec audit resource has the following special matchers. For a full list of available matchers (such as `exist`) please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
<% vars['matchers'].each do |matcher| %>
### be_<%=matcher%>
ADD_DESCRIPTION
describe <%=vars['resource_name']%>('<%=vars['assert_param']%>') do
it { should be_<%=matcher%> }
end
<% end %>