summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/network/vyos/vyos_config.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/modules/network/vyos/vyos_config.py')
-rw-r--r--lib/ansible/modules/network/vyos/vyos_config.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/ansible/modules/network/vyos/vyos_config.py b/lib/ansible/modules/network/vyos/vyos_config.py
index 5af2147172..25711a0cc4 100644
--- a/lib/ansible/modules/network/vyos/vyos_config.py
+++ b/lib/ansible/modules/network/vyos/vyos_config.py
@@ -208,13 +208,7 @@ def get_candidate(module):
def format_commands(commands):
- """
- This function format the input commands and removes the prepend white spaces
- for command lines having 'set' or 'delete' and it skips empty lines.
- :param commands:
- :return: list of commands
- """
- return [line.strip() if line.split()[0] in ('set', 'delete') else line for line in commands if len(line.strip()) > 0]
+ return [line for line in commands if len(line.strip()) > 0]
def diff_config(commands, config):