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 a6e425e5a3)
This commit is contained in:
Trishna Guha 2017-11-21 03:35:53 +00:00 committed by GitHub
parent ecf2dfd6d5
commit b0404dbe39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -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)
<a id="2.4.1"></a>

View file

@ -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)