From 29c342fa51c7a9866366cfc20968be7270e02fc5 Mon Sep 17 00:00:00 2001 From: "Bradley A. Thornton" Date: Fri, 9 Aug 2019 12:05:55 -0700 Subject: 79 --- plugins/modules/vyos_system.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'plugins/modules/vyos_system.py') diff --git a/plugins/modules/vyos_system.py b/plugins/modules/vyos_system.py index 99841542..4f0d5db7 100644 --- a/plugins/modules/vyos_system.py +++ b/plugins/modules/vyos_system.py @@ -158,9 +158,13 @@ def spec_to_commands(want, have): commands.append("delete system %s" % device_key) for config in proposed: if state == "absent" and config in current: - commands.append("delete system %s '%s'" % (device_key, config)) + commands.append( + "delete system %s '%s'" % (device_key, config) + ) elif state == "present" and config not in current: - commands.append("set system %s '%s'" % (device_key, config)) + commands.append( + "set system %s '%s'" % (device_key, config) + ) else: if state == "absent" and current and proposed: commands.append("delete system %s" % device_key) @@ -186,7 +190,9 @@ def main(): domain_name=dict(type="str"), domain_search=dict(type="list"), name_server=dict(type="list", aliases=["name_servers"]), - state=dict(type="str", default="present", choices=["present", "absent"]), + state=dict( + type="str", default="present", choices=["present", "absent"] + ), ) argument_spec.update(vyos_argument_spec) -- cgit v1.2.3