From 74eb0bfb13e56ebf7ff3c5841ae7c97e7e4efcd2 Mon Sep 17 00:00:00 2001 From: Ricardo Carrillo Cruz Date: Mon, 15 Jan 2018 14:16:45 +0100 Subject: [PATCH] Add missing flags param to IOS get_config cliconf method (#34869) --- lib/ansible/plugins/cliconf/ios.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ansible/plugins/cliconf/ios.py b/lib/ansible/plugins/cliconf/ios.py index 920b5f52fa1..2b730b08dac 100644 --- a/lib/ansible/plugins/cliconf/ios.py +++ b/lib/ansible/plugins/cliconf/ios.py @@ -53,13 +53,18 @@ class Cliconf(CliconfBase): return device_info @enable_mode - def get_config(self, source='running'): + def get_config(self, source='running', flags=None): if source not in ('running', 'startup'): return self.invalid_params("fetching configuration from %s is not supported" % source) if source == 'running': cmd = b'show running-config all' else: cmd = b'show startup-config' + + flags = [] if flags is None else flags + cmd += ' '.join(flags) + cmd = cmd.strip() + return self.send_command(cmd) @enable_mode