diff --git a/changelogs/fragments/interfaces_file-allow.yaml b/changelogs/fragments/interfaces_file-allow.yaml new file mode 100644 index 00000000000..96326511773 --- /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 a6a5d91b52b..ef68aa89b36 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":