summaryrefslogtreecommitdiff
path: root/plugins/modules/vyos_system.py
diff options
context:
space:
mode:
authoransible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>2019-08-09 19:11:48 +0000
committerGitHub <noreply@github.com>2019-08-09 19:11:48 +0000
commit66a01fb3cdcedff9205b2295870a7e1629bbae69 (patch)
treebe8d5d5490ec5c49a2f33b83184e35d58d635895 /plugins/modules/vyos_system.py
parentfbe294b702e757252a66f64edf66bce060e87494 (diff)
parent29c342fa51c7a9866366cfc20968be7270e02fc5 (diff)
downloadvyos.vyos-66a01fb3cdcedff9205b2295870a7e1629bbae69.tar.gz
vyos.vyos-66a01fb3cdcedff9205b2295870a7e1629bbae69.zip
Merge pull request #10 from ansible-network/bt_79
79 Reviewed-by: Paul Belanger https://github.com/pabelanger
Diffstat (limited to 'plugins/modules/vyos_system.py')
-rw-r--r--plugins/modules/vyos_system.py12
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)