Skip to content

Commit 69c3afb

Browse files
authored
Merge pull request #14 from inspec/im/reorganize_content
Reorganize Podman resource docs
2 parents e4f974c + 42540dd commit 69c3afb

File tree

8 files changed

+80
-105
lines changed

8 files changed

+80
-105
lines changed

docs-chef-io/content/_index.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
+++
2+
title = "About the Chef InSpec Podman resource pack"
3+
draft = false
4+
linkTitle = "Podman resource pack"
5+
summary = "Chef InSpec resources for auditing Podman."
6+
7+
[cascade]
8+
[cascade.params]
9+
platform = "podman"
10+
11+
[menu.podman]
12+
title = "About Podman resources"
13+
identifier = "inspec/resources/podman/about"
14+
parent = "inspec/resources/podman"
15+
weight = 10
16+
+++
17+
18+
The InSpec Podman resources allow you to test and validate the state of Podman containers, images, pods, networks, and volumes.
19+
20+
## Support
21+
22+
The InSpec Podman resources were part of InSpec core through InSpec 6.
23+
Starting in InSpec 7, they're released separately as a Ruby gem.
24+
25+
## Usage
26+
27+
To add this resource pack to an InSpec profile, add the `inspec-podman-resources` gem as a dependency in your `inspec.yml` file:
28+
29+
```yaml
30+
depends:
31+
- name: inspec-podman-resources
32+
gem: inspec-podman-resources
33+
```
34+
35+
## Podman resources
36+
37+
{{< inspec_resources_filter >}}
38+
39+
The following Chef InSpec Podman resources are available in this resource pack.
40+
41+
{{< inspec_resources section="podman" platform="podman" >}}

docs/resources/podman.md renamed to docs-chef-io/content/podman.md

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
11
+++
22
title = "podman resource"
33
draft = false
4-
gh_repo = "inspec"
5-
platform = "unix"
64

7-
[menu]
8-
[menu.inspec]
5+
6+
[menu.podman]
97
title = "podman"
108
identifier = "inspec/resources/os/podman.md podman resource"
119
parent = "inspec/resources/os"
1210
+++
1311

1412
Use the `podman` Chef InSpec audit resource to test the configuration of Podman resources.
1513

16-
## Availability
17-
18-
### Install
19-
20-
This resource is distributed with Chef InSpec and is automatically available for use.
21-
2214
## Syntax
2315

2416
Use the `podman` Chef InSpec audit resource to test multiple Podman containers.
@@ -110,7 +102,7 @@ where:
110102

111103
The following examples show how to use this Chef InSpec audit resource.
112104

113-
### Returns all running containers
105+
Return all running containers:
114106

115107
```ruby
116108
podman.containers.running?.ids.each do |id|
@@ -120,11 +112,7 @@ podman.containers.running?.ids.each do |id|
120112
end
121113
```
122114

123-
## Resource Parameter Examples
124-
125-
### containers
126-
127-
`containers` returns information about containers as returned by [podman ps -a](https://docs.podman.io/en/latest/markdown/podman.1.html).
115+
Return information about containers as returned by [podman ps -a](https://docs.podman.io/en/latest/markdown/podman.1.html):
128116

129117
```ruby
130118
describe podman.containers do
@@ -135,9 +123,7 @@ describe podman.containers do
135123
end
136124
```
137125

138-
### images
139-
140-
`images` returns information about a Podman image as returned by [podman images -a](https://docs.podman.io/en/latest/markdown/podman-images.1.html).
126+
Return information about a Podman image as returned by [podman images -a](https://docs.podman.io/en/latest/markdown/podman-images.1.html):
141127

142128
```ruby
143129
describe podman.images do
@@ -147,9 +133,7 @@ describe podman.images do
147133
end
148134
```
149135
150-
### pods
151-
152-
`pods` returns information about pods as returned by [podman pod ps](https://docs.podman.io/en/latest/markdown/podman-pod-ps.1.html).
136+
Return information about pods as returned by [podman pod ps](https://docs.podman.io/en/latest/markdown/podman-pod-ps.1.html).
153137
154138
```ruby
155139
describe podman.pods do
@@ -159,9 +143,7 @@ describe podman.pods do
159143
end
160144
```
161145
162-
### networks
163-
164-
`networks` returns information about a Podman network as returned by [podman network ls](https://docs.podman.io/en/latest/markdown/podman-network-ls.1.html).
146+
Return information about a Podman network as returned by [podman network ls](https://docs.podman.io/en/latest/markdown/podman-network-ls.1.html):
165147
166148
```ruby
167149
describe podman.networks do
@@ -171,9 +153,7 @@ describe podman.networks do
171153
end
172154
```
173155
174-
### volumes
175-
176-
`volumes` returns information about a Podman volume as returned by [podman volume ls](https://docs.podman.io/en/latest/markdown/podman-volume-ls.1.html).
156+
Return information about a Podman volume as returned by [podman volume ls](https://docs.podman.io/en/latest/markdown/podman-volume-ls.1.html):
177157
178158
```ruby
179159
describe podman.volumes do
@@ -182,19 +162,15 @@ describe podman.volumes do
182162
end
183163
```
184164
185-
### info
186-
187-
`info` returns the parsed result of [podman info](https://docs.podman.io/en/latest/markdown/podman-info.1.html).
165+
Return the parsed result of [podman info](https://docs.podman.io/en/latest/markdown/podman-info.1.html).
188166
189167
```ruby
190168
describe podman.info do
191169
its("host.os") { should eq "linux" }
192170
end
193171
```
194172
195-
### version
196-
197-
`version` returns the parsed result of [podman version](https://docs.podman.io/en/latest/markdown/podman-version.1.html)
173+
Return the parsed result of [podman version](https://docs.podman.io/en/latest/markdown/podman-version.1.html):
198174
199175
```ruby
200176
describe podman.version do
@@ -203,9 +179,7 @@ describe podman.version do
203179
end
204180
```
205181
206-
### object('id')
207-
208-
`object` returns low-level information about Podman objects as returned by [podman inspect](https://docs.podman.io/en/latest/markdown/podman-inspect.1.html).
182+
Return low-level information about Podman objects as returned by [podman inspect](https://docs.podman.io/en/latest/markdown/podman-inspect.1.html):
209183
210184
```ruby
211185
describe podman.object(id) do
@@ -215,4 +189,4 @@ end
215189
216190
## Matchers
217191
218-
{{< readfile file="content/inspec/reusable/md/inspec_matchers_link.md" >}}
192+
{{< readfile file="content/reusable/md/inspec_matchers_link.md" >}}

docs/resources/podman_container.md renamed to docs-chef-io/content/podman_container.md

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
11
+++
22
title = "podman_container resource"
33
draft = false
4-
gh_repo = "inspec"
5-
platform = "unix"
64

7-
[menu]
8-
[menu.inspec]
5+
6+
[menu.podman]
97
title = "podman_container"
108
identifier = "inspec/resources/os/podman_container.md podman_container resource"
119
parent = "inspec/resources/os"
1210
+++
1311

1412
Use the `podman_container` Chef InSpec audit resource to test the configuration of Podman containers.
1513

16-
## Availability
17-
18-
### Install
19-
20-
This resource is distributed with Chef InSpec and is automatically available for use.
21-
2214
## Syntax
2315

2416
Use the `podman_container` Chef InSpec audit resource to test the properties of a Podman container.
@@ -106,8 +98,9 @@ its('command') { should eq 'nc -ll -p 1234 -e /bin/cat' }
10698

10799
## Matchers
108100

109-
{{< readfile file="content/inspec/reusable/md/inspec_matchers_link.md" >}}
110-
The specific matchers of this resource are: `exist` and `be_running`.
101+
{{< readfile file="content/reusable/md/inspec_matchers_link.md" >}}
102+
103+
The specific matchers of this resource are: `exist` and `be_running`.
111104

112105
### exist
113106

@@ -129,19 +122,15 @@ it { should be_running }
129122

130123
The following examples show how to use this Chef InSpec audit resource.
131124

132-
### Ensures container exists
133-
134-
The below test passes if the container `sweet_mendeleev` exists as part of the Podman instances.
125+
Ensure the container `sweet_mendeleev` exists as part of the Podman instances:
135126

136127
```ruby
137128
describe podman_container('sweet_mendeleev') do
138129
it { should exist }
139130
end
140131
```
141132

142-
### Ensures container is in running status
143-
144-
The below test passes if the container `sweet_mendeleev` exists as part of the Podman instances and the status is running.
133+
Ensure the container `sweet_mendeleev` exists as part of the Podman instances and the status is running:
145134

146135
```ruby
147136
describe podman_container('sweet_mendeleev') do

docs/resources/podman_image.md renamed to docs-chef-io/content/podman_image.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
11
+++
22
title = "podman_image resource"
33
draft = false
4-
gh_repo = "inspec"
5-
platform = "unix"
64

7-
[menu]
8-
[menu.inspec]
5+
6+
[menu.podman]
97
title = "podman_image"
108
identifier = "inspec/resources/os/podman_image.md podman_image resource"
119
parent = "inspec/resources/os"
1210
+++
1311

1412
Use the `podman_image` Chef InSpec audit resource to test the properties of a container image on Podman.
1513

16-
## Availability
17-
18-
### Install
19-
20-
This resource is distributed with Chef InSpec and is automatically available for use.
21-
2214
## Syntax
2315

2416
Use the `podman_image` Chef InSpec audit resource to test the properties of a container image on Podman.
@@ -156,7 +148,7 @@ its("virtual_size") { should eq 1636053 }
156148

157149
## Matchers
158150

159-
{{< readfile file="content/inspec/reusable/md/inspec_matchers_link.md" >}}
151+
{{< readfile file="content/reusable/md/inspec_matchers_link.md" >}}
160152

161153
This resource has the following special matchers.
162154

@@ -170,7 +162,7 @@ it { should exist }
170162

171163
## Examples
172164

173-
### Test if an image exists on Podman and verify the various image properties
165+
Test if an image exists on Podman and verify the various image properties:
174166

175167
```ruby
176168
describe podman_image("docker.io/library/busybox") do

docs/resources/podman_network.md renamed to docs-chef-io/content/podman_network.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
11
+++
22
title = "podman_network resource"
33
draft = false
4-
gh_repo = "inspec"
5-
platform = "unix"
64

7-
[menu]
8-
[menu.inspec]
5+
6+
[menu.podman]
97
title = "podman_network"
108
identifier = "inspec/resources/os/podman_network.md podman_network resource"
119
parent = "inspec/resources/os"
1210
+++
1311

1412
Use the `podman_network` Chef InSpec audit resource to test the properties of existing Podman networks.
1513

16-
## Availability
17-
18-
### Install
19-
20-
This resource is distributed with Chef InSpec and is automatically available for use.
21-
2214
## Syntax
2315

2416
Use the `podman_network` Chef InSpec audit resource to test the properties of a Podman network.
@@ -156,7 +148,7 @@ its("options") { should eq nil }
156148

157149
## Matchers
158150

159-
{{< readfile file="content/inspec/reusable/md/inspec_matchers_link.md" >}}
151+
{{< readfile file="content/reusable/md/inspec_matchers_link.md" >}}
160152

161153
This resource has the following special matchers.
162154

@@ -170,7 +162,7 @@ it { should exist }
170162

171163
## Examples
172164

173-
### Tests if a given Podman network exists and verifies the various network properties
165+
Test if a given Podman network exists and verifies the various network properties:
174166

175167
```ruby
176168
describe podman_network("minikube") do

docs/resources/podman_pod.md renamed to docs-chef-io/content/podman_pod.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
11
+++
22
title = "podman_pod resource"
33
draft = false
4-
gh_repo = "inspec"
5-
platform = "unix"
64

7-
[menu]
8-
[menu.inspec]
5+
6+
[menu.podman]
97
title = "podman_pod"
108
identifier = "inspec/resources/os/podman_pod.md podman_pod resource"
119
parent = "inspec/resources/os"
1210
+++
1311

1412
Use the `podman_pod` Chef InSpec audit resource to test the properties of a pod on Podman.
1513

16-
## Availability
17-
18-
### Install
19-
20-
This resource is distributed with Chef InSpec and is automatically available for use.
21-
2214
## Syntax
2315

2416
Use the `podman_pod` Chef InSpec audit resource to test the properties of a pod on Podman.
@@ -166,7 +158,7 @@ its("containers") { should_not be nil }
166158

167159
## Matchers
168160

169-
{{< readfile file="content/inspec/reusable/md/inspec_matchers_link.md" >}}
161+
{{< readfile file="content/reusable/md/inspec_matchers_link.md" >}}
170162

171163
This resource has the following special matchers.
172164

@@ -180,7 +172,7 @@ it { should exist }
180172

181173
## Examples
182174

183-
### Test if a pod exists on Podman and verifies pod properties
175+
Test if a pod exists on Podman and verifies pod properties:
184176

185177
```ruby
186178
describe podman_pod("nginx-frontend") do
@@ -203,7 +195,7 @@ describe podman_pod("nginx-frontend") do
203195
end
204196
```
205197

206-
### Test if a pod does not exist on Podman
198+
Test if a pod doesn't exist on Podman:
207199

208200
```ruby
209201
describe podman_pod("non_existing_pod") do

0 commit comments

Comments
 (0)