diff options
author | John R Barker <john@johnrbarker.com> | 2018-05-11 15:25:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-11 15:25:04 +0100 |
commit | 6a46e3a44b41c2b8c4b74de5af42c1451f135f5b (patch) | |
tree | f771c349131297a064c94c181b8f99608b30a1b5 | |
parent | 928e1e8f99272649071566978669db3ce78afe84 (diff) | |
download | ansible-6a46e3a44b41c2b8c4b74de5af42c1451f135f5b.tar.gz |
Backport/2.5/37847Fix interfaces_file to accept allow-* (#37847 (#40008)
* Fix interfaces_file to accept allow-* (#37847)
(cherry picked from commit 5ac41ee8d840f79e701f98499b3cd0793367fe54)
* interfaces-file
-rw-r--r-- | changelogs/fragments/interfaces_file-allow.yaml | 2 | ||||
-rwxr-xr-x | lib/ansible/modules/system/interfaces_file.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/changelogs/fragments/interfaces_file-allow.yaml b/changelogs/fragments/interfaces_file-allow.yaml new file mode 100644 index 0000000000..9632651177 --- /dev/null +++ b/changelogs/fragments/interfaces_file-allow.yaml @@ -0,0 +1,2 @@ +bugfixes: +- Fix interfaces_file to support `allow-` https://github.com/ansible/ansible/pull/37847 diff --git a/lib/ansible/modules/system/interfaces_file.py b/lib/ansible/modules/system/interfaces_file.py index a6a5d91b52..ef68aa89b3 100755 --- a/lib/ansible/modules/system/interfaces_file.py +++ b/lib/ansible/modules/system/interfaces_file.py @@ -225,7 +225,7 @@ def read_interfaces_lines(module, line_strings): elif words[0] == "auto": lines.append(lineDict(line)) currently_processing = "NONE" - elif words[0] == "allow-": + elif words[0].startswith("allow-"): lines.append(lineDict(line)) currently_processing = "NONE" elif words[0] == "no-auto-down": |