From 0a85e64b4a95dbbd11e0ee605adc509a0234800e Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Tue, 27 Sep 2016 22:17:32 -0400 Subject: [PATCH] fixes exception raised due to KeyError (#5068) The vyos_config module would error when looking for a key called `updates` in module.params. There is no such key. This fixes the problem. --- lib/ansible/modules/network/vyos/vyos_config.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/ansible/modules/network/vyos/vyos_config.py b/lib/ansible/modules/network/vyos/vyos_config.py index 706f64911fc..7ee3a272bdf 100644 --- a/lib/ansible/modules/network/vyos/vyos_config.py +++ b/lib/ansible/modules/network/vyos/vyos_config.py @@ -244,12 +244,11 @@ def run(module, result): result['updates'] = updates - if module.params['update'] != 'check': - load_config(module, updates, result) + load_config(module, updates, result) - if result.get('filtered'): - result['warnings'].append('Some configuration commands where ' - 'removed, please see the filtered key') + if result.get('filtered'): + result['warnings'].append('Some configuration commands where ' + 'removed, please see the filtered key') def main():