You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+67-67Lines changed: 67 additions & 67 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,89 +145,89 @@ Files with special characters that are not valid UTF-8 give the error message "I
145
145
146
146
**Autorequires:** If Puppet is managing the file that contains the line being managed, the `file_line` resource autorequires that file.
147
147
148
-
##### Parameters
148
+
**Parameters**
149
149
150
150
All parameters are optional, unless otherwise noted.
151
151
152
-
*`after`
152
+
#####`after`
153
153
154
-
Specifies the line after which Puppet adds any new lines using a regular expression. (Existing lines are added in place.)
154
+
Specifies the line after which Puppet adds any new lines using a regular expression. (Existing lines are added in place.)
155
155
156
-
Values: String containing a regex.
157
-
158
-
Default value: `undef`.
159
-
160
-
*`encoding`
161
-
162
-
Specifies the correct file encoding.
156
+
Values: String containing a regex.
163
157
164
-
Values: String specifying a valid Ruby character encoding.
165
-
166
-
Default: 'UTF-8'.
158
+
Default value: `undef`.
167
159
168
-
*`ensure`: Specifies whether the resource is present.
160
+
##### `encoding`
169
161
170
-
Values: 'present', 'absent'.
171
-
172
-
Default value: 'present'.
173
-
174
-
*`line`
162
+
Specifies the correct file encoding.
175
163
176
-
**Required.**
177
-
178
-
Sets the line to be added to the file located by the `path` parameter.
179
-
180
-
Values: String.
181
-
182
-
*`match`
164
+
Values: String specifying a valid Ruby character encoding.
183
165
184
-
Specifies a regular expression to compare against existing lines in the file; if a match is found, it is replaced rather than adding a new line. A regex comparison is performed against the line value, and if it does not match, an exception is raised.
185
-
186
-
Values: String containing a regex.
187
-
188
-
Default value: `undef`.
189
-
166
+
Default: 'UTF-8'.
190
167
191
-
*`match_for_absence`
168
+
##### `ensure`: Specifies whether the resource is present.
192
169
193
-
Specifies whether a match should be applied when `ensure => absent`. If set to `true` and match is set, the line that matches is deleted. If set to `false` (the default), match is ignored when `ensure => absent` and the value of `line` is used instead. Ignored when `ensure => present`.
194
-
195
-
Boolean.
196
-
197
-
Default value: `false`.
198
-
199
-
*`multiple`
170
+
Values: 'present', 'absent'.
200
171
201
-
Specifies whether `match` and `after` can change multiple lines. If set to `false`, an exception is raised if more than one line matches.
202
-
203
-
Values: `true`, `false`.
204
-
205
-
Default value: `false`.
206
-
207
-
208
-
*`name`
172
+
Default value: 'present'.
209
173
210
-
Specifies the name to use as the identity of the resource. If you want the resource namevar to differ from the supplied `title` of the resource, specify it with `name`.
211
-
212
-
Values: String.
213
-
214
-
Default value: The value of the title.
215
-
216
-
*`path`
174
+
##### `line`
217
175
218
-
**Required.**
219
-
220
-
Specifies the file in which Puppet ensures the line specified by `line`.
221
-
222
-
Value: String specifying an absolute path to the file.
223
-
224
-
*`replace`
176
+
**Required.**
225
177
226
-
Specifies whether the resource overwrites an existing line that matches the `match` parameter. If set to `false` and a line is found matching the `match` parameter, the line is not placed in the file.
227
-
228
-
Boolean.
178
+
Sets the line to be added to the file located by the `path` parameter.
179
+
180
+
Values: String.
229
181
230
-
Default value: `true`.
182
+
##### `match`
183
+
184
+
Specifies a regular expression to compare against existing lines in the file; if a match is found, it is replaced rather than adding a new line. A regex comparison is performed against the line value, and if it does not match, an exception is raised.
185
+
186
+
Values: String containing a regex.
187
+
188
+
Default value: `undef`.
189
+
190
+
191
+
##### `match_for_absence`
192
+
193
+
Specifies whether a match should be applied when `ensure => absent`. If set to `true` and match is set, the line that matches is deleted. If set to `false` (the default), match is ignored when `ensure => absent` and the value of `line` is used instead. Ignored when `ensure => present`.
194
+
195
+
Boolean.
196
+
197
+
Default value: `false`.
198
+
199
+
##### `multiple`
200
+
201
+
Specifies whether `match` and `after` can change multiple lines. If set to `false`, an exception is raised if more than one line matches.
202
+
203
+
Values: `true`, `false`.
204
+
205
+
Default value: `false`.
206
+
207
+
208
+
##### `name`
209
+
210
+
Specifies the name to use as the identity of the resource. If you want the resource namevar to differ from the supplied `title` of the resource, specify it with `name`.
211
+
212
+
Values: String.
213
+
214
+
Default value: The value of the title.
215
+
216
+
##### `path`
217
+
218
+
**Required.**
219
+
220
+
Specifies the file in which Puppet ensures the line specified by `line`.
221
+
222
+
Value: String specifying an absolute path to the file.
223
+
224
+
##### `replace`
225
+
226
+
Specifies whether the resource overwrites an existing line that matches the `match` parameter. If set to `false` and a line is found matching the `match` parameter, the line is not placed in the file.
0 commit comments