From b0404dbe39ab1c807737de88367a632d34d626f7 Mon Sep 17 00:00:00 2001 From: Trishna Guha Date: Tue, 21 Nov 2017 03:35:53 +0000 Subject: [PATCH] ios_logging: change IOS command pipe to section to include (#33100) (#33116) This improves compatibility with older IOS devices which do not support "section" but "include" has been supported for a lot longer. (cherry picked from commit a6e425e5a35b2baae7118cb6d64b0c33e7c20fcb) --- CHANGELOG.md | 2 ++ lib/ansible/modules/network/ios/ios_logging.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12415e53483..866f2a9c122 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -176,6 +176,8 @@ Ansible Changes By Release (https://github.com/ansible/ansible/pull/32710) * Fix nxos_snmp_host bug (https://github.com/ansible/ansible/pull/32916) +* Make IOS devices consistent ios_logging + (https://github.com/ansible/ansible/pull/33100) diff --git a/lib/ansible/modules/network/ios/ios_logging.py b/lib/ansible/modules/network/ios/ios_logging.py index 3ce53f563d5..f162df33314 100644 --- a/lib/ansible/modules/network/ios/ios_logging.py +++ b/lib/ansible/modules/network/ios/ios_logging.py @@ -245,7 +245,7 @@ def map_config_to_obj(module): obj = [] dest_group = ('console', 'host', 'monitor', 'buffered', 'on', 'facility') - data = get_config(module, flags=['| section logging']) + data = get_config(module, flags=['| include logging']) for line in data.split('\n'): match = re.search(r'logging (\S+)', line, re.M)