diff options
author | Koki Nomura <kokinomura1@gmail.com> | 2016-11-18 03:28:09 +0900 |
---|---|---|
committer | Rene Moser <mail@renemoser.net> | 2016-11-17 20:15:19 +0100 |
commit | b435b793899892b6c98dcfe33d7fbad4761b7b92 (patch) | |
tree | d4f2b05681cea22e2d5db10201f0bf9b50ba57af | |
parent | 34ec2e9af90a246ddb1c36cd8a318c8446db0ced (diff) | |
download | ansible-modules-extras-b435b793899892b6c98dcfe33d7fbad4761b7b92.tar.gz |
blockinfile: Fixes #1926 by comparing a marker to a whole line instead of a line prefix (#3339)
(cherry picked from commit 94ef04befedae18514c401740dac3981f2e098ec)
-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 0f0ffb64..07c6ad2b 100755 --- a/files/blockinfile.py +++ b/files/blockinfile.py @@ -252,9 +252,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): |