diff options
Diffstat (limited to 'plugins/modules/vyos_ping.py')
-rw-r--r-- | plugins/modules/vyos_ping.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/modules/vyos_ping.py b/plugins/modules/vyos_ping.py index 79345830..8c0330df 100644 --- a/plugins/modules/vyos_ping.py +++ b/plugins/modules/vyos_ping.py @@ -134,12 +134,12 @@ rtt: sample: {"avg": 2, "max": 8, "min": 1, "mdev": 24} """ -from ansible.module_utils.basic import AnsibleModule -from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.vyos import ( - run_commands, -) import re +from ansible.module_utils.basic import AnsibleModule + +from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.vyos import run_commands + def main(): """main entry point for module execution""" @@ -150,9 +150,7 @@ def main(): ttl=dict(type="int"), size=dict(type="int"), interval=dict(type="int"), - state=dict( - type="str", choices=["absent", "present"], default="present" - ), + state=dict(type="str", choices=["absent", "present"], default="present"), ) module = AnsibleModule(argument_spec=argument_spec) @@ -170,9 +168,7 @@ def main(): if warnings: results["warnings"] = warnings - results["commands"] = [ - build_ping(dest, count, size, interval, source, ttl) - ] + results["commands"] = [build_ping(dest, count, size, interval, source, ttl)] ping_results = run_commands(module, commands=results["commands"]) ping_results_list = ping_results[0].split("\n") |