Skip to content

Commit 77327c7

Browse files
authored
Merge pull request #828 from jbondpdx/release
README fixups for 4.21.0 release
2 parents 38d571b + 8733960 commit 77327c7

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

README.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,17 @@ file_line { 'bashrc_proxy':
127127
}
128128
```
129129

130-
In this code example, `match` looks for a line beginning with export followed by HTTP_PROXY and replaces it with the value in line. If a match is not found, then no changes are made to the file.
130+
In this code example, `match` looks for a line beginning with export followed by 'HTTP_PROXY' and replaces it with the value in line. If a match is not found, then no changes are made to the file.
131131

132-
Examples With `ensure => absent`:
132+
Examples of `ensure => absent`:
133133

134134
This type has two behaviors when `ensure => absent` is set.
135135

136-
One possibility is to set `match => ...` and `match_for_absence => true`,
137-
as in the following example:
136+
The first is to set `match => ...` and `match_for_absence => true`. Match looks for a line beginning with 'export', followed by 'HTTP_PROXY', and then deletes it. If multiple lines match, an error is raised unless the `multiple => true` parameter is set.
137+
138+
The `line => ...` parameter in this example would be accepted but ignored.
139+
140+
For example:
138141

139142
```puppet
140143
file_line { 'bashrc_proxy':
@@ -145,15 +148,9 @@ file_line { 'bashrc_proxy':
145148
}
146149
```
147150

148-
In this code example match will look for a line beginning with export
149-
followed by HTTP_PROXY and delete it. If multiple lines match, an
150-
error will be raised unless the `multiple => true` parameter is set.
151+
The second way of using `ensure => absent` is to specify a `line => ...` and no match. When ensuring lines are absent, the default behavior is to remove all lines matching. This behavior can't be disabled.
151152

152-
Note that the `line => ...` parameter would be accepted *but ignored* in
153-
the above example.
154-
155-
The second way of using `ensure => absent` is to specify a `line => ...`,
156-
and no match:
153+
For example:
157154

158155
```puppet
159156
file_line { 'bashrc_proxy':
@@ -163,9 +160,6 @@ file_line { 'bashrc_proxy':
163160
}
164161
```
165162

166-
Note that when ensuring lines are absent this way, the default behavior
167-
this time is to always remove all lines matching, and this behavior
168-
can't be disabled.
169163

170164
Encoding example:
171165

@@ -236,7 +230,7 @@ Default value: `false`.
236230

237231
##### `multiple`
238232

239-
Specifies whether `match` and `after` can change multiple lines. If set to `false`, allows file\_line to replace only one line and raises an error if more than one will be replaced. If set to `true`, allows file\_line to replace one or more lines.
233+
Specifies whether `match` and `after` can change multiple lines. If set to `false`, allows file_line to replace only one line and raises an error if more than one will be replaced. If set to `true`, allows file_line to replace one or more lines.
240234

241235
Values: `true`, `false`.
242236

@@ -271,7 +265,7 @@ Default value: `true`.
271265

272266
##### `replace_all_matches_not_matching_line`
273267

274-
Replace all lines matched by `match` parameter, even if `line` already exists in the file.
268+
Replaces all lines matched by `match` parameter, even if `line` already exists in the file.
275269

276270
Default value: `false`.
277271

0 commit comments

Comments
 (0)