mirror of
https://github.com/zahodi/ansible-mikrotik.git
synced 2025-08-19 08:48:43 +02:00
add check mode the ip neighbor
This commit is contained in:
parent
2e9470d232
commit
5c57fdccad
2 changed files with 67 additions and 58 deletions
|
@ -71,7 +71,8 @@ def main():
|
||||||
choices = ['present', 'absent'],
|
choices = ['present', 'absent'],
|
||||||
type = 'str'
|
type = 'str'
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
|
supports_check_mode=True
|
||||||
)
|
)
|
||||||
|
|
||||||
idempotent_parameter = None
|
idempotent_parameter = None
|
||||||
|
@ -87,7 +88,7 @@ def main():
|
||||||
desired_params = params['settings'],
|
desired_params = params['settings'],
|
||||||
idempotent_param = idempotent_parameter,
|
idempotent_param = idempotent_parameter,
|
||||||
api_path = '/ip/neighbor/' + str(params['parameter']),
|
api_path = '/ip/neighbor/' + str(params['parameter']),
|
||||||
|
check_mode = module.check_mode
|
||||||
)
|
)
|
||||||
|
|
||||||
mt_obj.sync_state()
|
mt_obj.sync_state()
|
||||||
|
|
|
@ -1984,7 +1984,11 @@
|
||||||
name: ether2
|
name: ether2
|
||||||
discover: "no"
|
discover: "no"
|
||||||
register: discovery_edit
|
register: discovery_edit
|
||||||
failed_when: ( discovery_edit | changed )
|
failed_when: (
|
||||||
|
not ansible_check_mode
|
||||||
|
) and (
|
||||||
|
( discovery_edit | changed )
|
||||||
|
)
|
||||||
|
|
||||||
- name: ALWAYS_CHANGES edit a interface discovery option
|
- name: ALWAYS_CHANGES edit a interface discovery option
|
||||||
mt_neighbor:
|
mt_neighbor:
|
||||||
|
@ -1996,7 +2000,11 @@
|
||||||
name: ether2
|
name: ether2
|
||||||
discover: "yes"
|
discover: "yes"
|
||||||
register: discovery_edit
|
register: discovery_edit
|
||||||
failed_when: not ( discovery_edit | changed )
|
failed_when: (
|
||||||
|
not ansible_check_mode
|
||||||
|
) and (
|
||||||
|
not ( discovery_edit | changed )
|
||||||
|
)
|
||||||
|
|
||||||
tags: neighbor
|
tags: neighbor
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue