mirror of
https://github.com/zahodi/ansible-mikrotik.git
synced 2025-06-29 13:00:04 +02:00
still work in progress
This commit is contained in:
parent
da86eb8a6b
commit
8aa0c16c84
3 changed files with 75 additions and 8 deletions
|
@ -1,7 +1,9 @@
|
|||
#!/usr/bin/env python
|
||||
from ansible.module_utils import MikrotikConnection
|
||||
import re
|
||||
import sys
|
||||
from mt_utils import get_connection
|
||||
|
||||
# import sys
|
||||
|
||||
|
||||
def list_to_string(list):
|
||||
|
@ -57,7 +59,7 @@ class MikrotikIdempotent():
|
|||
|
||||
def __init__(
|
||||
self, hostname, username, password, desired_params, api_path,
|
||||
state, idempotent_param, check_mode=False):
|
||||
state, idempotent_param, conn, check_mode=False):
|
||||
|
||||
self.state = state
|
||||
self.desired_params = desired_params
|
||||
|
@ -72,7 +74,7 @@ class MikrotikIdempotent():
|
|||
self.failed = False
|
||||
self.failed_msg = []
|
||||
|
||||
self.mk = MikrotikConnection.login()
|
||||
self.mk = conn
|
||||
|
||||
def get_current_params(self):
|
||||
clean_params(self.desired_params)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue