diff options
author | Kate Case <kcase@redhat.com> | 2023-01-25 08:37:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-25 08:37:58 -0500 |
commit | e9911888f6dcdf9031f3fdb2e32c52e45815fdbe (patch) | |
tree | dc22abb4a329ef04e98685b81d074679dc24c456 /plugins/modules/vyos_system.py | |
parent | bcfe61a3b6ff69f08450f3dbd8f0f1827fb18ab3 (diff) | |
download | vyos.vyos-e9911888f6dcdf9031f3fdb2e32c52e45815fdbe.tar.gz vyos.vyos-e9911888f6dcdf9031f3fdb2e32c52e45815fdbe.zip |
Add prettier and isort to pre-commit. (#270)
* Add prettier and isort to pre-commit.
* Bump line-length to 100
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Diffstat (limited to 'plugins/modules/vyos_system.py')
-rw-r--r-- | plugins/modules/vyos_system.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/plugins/modules/vyos_system.py b/plugins/modules/vyos_system.py index fd98507b..66a3fd4e 100644 --- a/plugins/modules/vyos_system.py +++ b/plugins/modules/vyos_system.py @@ -95,6 +95,7 @@ EXAMPLES = """ """ from ansible.module_utils.basic import AnsibleModule + from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.vyos import ( get_config, load_config, @@ -155,13 +156,9 @@ 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,12 +183,8 @@ def main(): host_name=dict(type="str"), domain_name=dict(type="str"), domain_search=dict(type="list", elements="str"), - name_server=dict( - type="list", aliases=["name_servers"], elements="str" - ), - state=dict( - type="str", default="present", choices=["present", "absent"] - ), + name_server=dict(type="list", aliases=["name_servers"], elements="str"), + state=dict(type="str", default="present", choices=["present", "absent"]), ) module = AnsibleModule( |