docs(lineinfile): fix typo inserbefore -> insertbefore (#54788)
parent
10c5e26ce8
commit
688409128a
|
@ -116,7 +116,7 @@ options:
|
||||||
firstmatch:
|
firstmatch:
|
||||||
description:
|
description:
|
||||||
- Used with C(insertafter) or C(insertbefore).
|
- Used with C(insertafter) or C(insertbefore).
|
||||||
- If set, C(insertafter) and C(inserbefore) find a first line has regular expression matches.
|
- If set, C(insertafter) and C(insertbefore) find a first line has regular expression matches.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: no
|
||||||
version_added: "2.5"
|
version_added: "2.5"
|
||||||
|
@ -285,7 +285,7 @@ def present(module, dest, regexp, line, insertafter, insertbefore, create,
|
||||||
bre_ins = None
|
bre_ins = None
|
||||||
|
|
||||||
# index[0] is the line num where regexp has been found
|
# index[0] is the line num where regexp has been found
|
||||||
# index[1] is the line num where insertafter/inserbefore has been found
|
# index[1] is the line num where insertafter/insertbefore has been found
|
||||||
index = [-1, -1]
|
index = [-1, -1]
|
||||||
m = None
|
m = None
|
||||||
b_line = to_bytes(line, errors='surrogate_or_strict')
|
b_line = to_bytes(line, errors='surrogate_or_strict')
|
||||||
|
|
|
@ -116,7 +116,7 @@ function Present($path, $regexp, $line, $insertafter, $insertbefore, $create, $b
|
||||||
}
|
}
|
||||||
|
|
||||||
# index[0] is the line num where regexp has been found
|
# index[0] is the line num where regexp has been found
|
||||||
# index[1] is the line num where insertafter/inserbefore has been found
|
# index[1] is the line num where insertafter/insertbefore has been found
|
||||||
$index = -1, -1;
|
$index = -1, -1;
|
||||||
$lineno = 0;
|
$lineno = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue