Skip to content

Commit 94d1dc7

Browse files
committed
More editing
Signed-off-by: Ian Maddaus <[email protected]>
1 parent a4fdb92 commit 94d1dc7

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

content/recipes_yaml.md

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,7 @@ To create a YAML recipe, follow these steps:
5353

5454
Chef Infra supports YAML recipes with both `.yml` and `.yaml` extensions.
5555

56-
1. Define your recipe using the following structure.
57-
It must have a top-level `resources` key containing an array of resource declarations. For example:
58-
59-
```yaml
60-
---
61-
resources:
62-
- type: "resource_type"
63-
name: "resource_name"
64-
property1: value1
65-
property2: value2
66-
- type: "another_resource_type"
67-
name: "another_resource_name"
68-
property1: value1
69-
property2: value2
70-
```
71-
72-
1. Declare each resource as an array that defines the following:
56+
1. Define your recipe with a top-level `resources` key containing an array of resources where each item has the following:
7357

7458
- `type`: The Chef resource type (string)
7559
- `name`: The resource name/identifier (string)
@@ -88,7 +72,10 @@ To create a YAML recipe, follow these steps:
8872
action: ["enable", "start"]
8973
```
9074
91-
In this example, the [`package` resource]({{< relref "/resources/package/" >}}) uses the `install` action to install Nginx version 1.18.0 and the [`service` resource]({{< relref "/resources/service/" >}}) uses the `enable` and `start` actions to start up Nginx.
75+
In this example:
76+
77+
- the [`package` resource]({{< relref "/resources/package/" >}}) uses the `install` action and the `version` property to install Nginx 1.18.0.
78+
- the [`service` resource]({{< relref "/resources/service/" >}}) uses the `enable` and `start` actions to enable and start up Nginx.
9279

9380
## Examples
9481

@@ -264,7 +251,7 @@ resources:
264251
name: "/tmp/file2.txt"
265252
```
266253

267-
Chef Infra Client returns the following error with multiple documents:
254+
Chef Infra Client returns the following error with multiple documents in one file:
268255

269256
```text
270257
ArgumentError: YAML recipe 'recipes/default.yml' contains multiple documents, only one is supported

0 commit comments

Comments
 (0)