diff options
author | Bradley A. Thornton <bthornto@thethorntons.net> | 2019-08-09 12:05:55 -0700 |
---|---|---|
committer | Bradley A. Thornton <bthornto@thethorntons.net> | 2019-08-09 12:05:55 -0700 |
commit | 29c342fa51c7a9866366cfc20968be7270e02fc5 (patch) | |
tree | 196722c57cca4211e79781edefe1a101d9c4b0c5 /plugins/modules/vyos_system.py | |
parent | 5fb9df4e907a6ab2da7a6c2dafdec9c1971e8d44 (diff) | |
download | vyos.vyos-29c342fa51c7a9866366cfc20968be7270e02fc5.tar.gz vyos.vyos-29c342fa51c7a9866366cfc20968be7270e02fc5.zip |
79
Diffstat (limited to 'plugins/modules/vyos_system.py')
-rw-r--r-- | plugins/modules/vyos_system.py | 12 |
1 files changed, 9 insertions, 3 deletions
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) |