diff options
author | Koki Nomura <kokinomura1@gmail.com> | 2016-11-18 03:28:09 +0900 |
---|---|---|
committer | René Moser <mail@renemoser.net> | 2016-11-17 19:28:09 +0100 |
commit | 94ef04befedae18514c401740dac3981f2e098ec (patch) | |
tree | 972658adcda77c9ed6ead40c7fe02934c68b42a6 /files | |
parent | 22a6449150ef451f14028e75e1ffc09d2a989a51 (diff) | |
download | ansible-modules-extras-94ef04befedae18514c401740dac3981f2e098ec.tar.gz |
blockinfile: Fixes #1926 by comparing a marker to a whole line instead of a line prefix (#3339)
Diffstat (limited to 'files')
-rwxr-xr-x | files/blockinfile.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/files/blockinfile.py b/files/blockinfile.py index 96f430cf..ecee4800 100755 --- a/files/blockinfile.py +++ b/files/blockinfile.py @@ -258,9 +258,9 @@ def main(): n0 = n1 = None for i, line in enumerate(lines): - if line.startswith(marker0): + if line == marker0: n0 = i - if line.startswith(marker1): + if line == marker1: n1 = i if None in (n0, n1): |