mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fixed nontype error (#27428)
This commit is contained in:
parent
3b1f2aeb16
commit
c594f1e1c9
2 changed files with 33 additions and 7 deletions
|
@ -232,17 +232,17 @@ def map_config_to_obj(module):
|
|||
|
||||
for line in data.split('\n'):
|
||||
match = re.search(r'logging (\S+)', line, re.M)
|
||||
|
||||
if match:
|
||||
if match.group(1) in dest_group:
|
||||
dest = match.group(1)
|
||||
else:
|
||||
pass
|
||||
|
||||
obj.append({'dest': dest,
|
||||
obj.append({
|
||||
'dest': dest,
|
||||
'name': parse_name(line, dest),
|
||||
'size': parse_size(line, dest),
|
||||
'facility': parse_facility(line),
|
||||
'level': parse_level(line, dest)})
|
||||
'level': parse_level(line, dest)
|
||||
})
|
||||
|
||||
return obj
|
||||
|
||||
|
|
|
@ -1,4 +1,30 @@
|
|||
---
|
||||
# ensure logging configs are empty
|
||||
- name: Remove host logging
|
||||
ios_logging:
|
||||
dest: host
|
||||
name: 172.16.0.1
|
||||
state: absent
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: Remove console
|
||||
ios_logging:
|
||||
dest: console
|
||||
level: warnings
|
||||
state: absent
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: Remove buffer
|
||||
ios_logging:
|
||||
dest: buffered
|
||||
size: 8000
|
||||
authorize: yes
|
||||
state: absent
|
||||
provider: "{{ cli }}"
|
||||
|
||||
# start tests
|
||||
- name: Set up host logging
|
||||
ios_logging:
|
||||
dest: host
|
||||
|
|
Loading…
Reference in a new issue