diff --git a/lib/ansible/module_utils/nxos.py b/lib/ansible/module_utils/nxos.py index 5bde5cccd1d..f75ac5123fc 100644 --- a/lib/ansible/module_utils/nxos.py +++ b/lib/ansible/module_utils/nxos.py @@ -180,7 +180,7 @@ class NxosModule(AnsibleModule): def get_config(self): cmd = 'show running-config' - if self.params['include_defaults']: + if self.params.get('include_defaults'): cmd += ' all' if self.params['transport'] == 'cli': return self.execute(cmd)[0]