finish migration

This commit is contained in:
Valentin Gurmeza 2018-01-24 15:25:43 -08:00
parent 86e8e6c295
commit 87630ba6f5
3 changed files with 42 additions and 45 deletions

View file

@ -30,6 +30,7 @@ options:
options: options:
- ethernet - ethernet
- vlan - vlan
- ovpn-client
settings: settings:
description: description:
- All Mikrotik compatible parameters for this particular endpoint. - All Mikrotik compatible parameters for this particular endpoint.

View file

@ -22,35 +22,21 @@ options:
description: description:
- password used for authentication to mikrotik router - password used for authentication to mikrotik router
required: True required: True
parameter:
description:
- sub endpoint for mikrotik system
required: True
options:
- scheduler
settings:
description:
- All Mikrotik compatible parameters for this particular endpoint.
Any yes/no values must be enclosed in double quotes
required: True
state: state:
description: description:
- scheduler task present or absent - absent or present
required: True required: True
choices:
- present
- absent
comment:
description:
- task comment
interval:
description:
- interval between two script executions, if time interval is set to zero, the script is only executed at its start time, otherwise it is executed repeatedly at the time interval is specified
name:
description:
- name of the task
required: True
on_event:
description:
- name of the script to execute.
start_date:
description:
- date of the first script execution
start_time:
description:
- time of the first script execution
policy:
description:
- policy
''' '''
EXAMPLES = ''' EXAMPLES = '''
@ -59,6 +45,7 @@ EXAMPLES = '''
username: "{{ mt_user }}" username: "{{ mt_user }}"
password: "{{ mt_pass }}" password: "{{ mt_pass }}"
state: present state: present
parameter: scheduler
name: test_by_ansible name: test_by_ansible
comment: ansible_test comment: ansible_test
on_event: put "hello" on_event: put "hello"
@ -81,7 +68,7 @@ def main():
type = 'str' type = 'str'
), ),
state = dict( state = dict(
required = False, required = True,
choices = ['present', 'absent'], choices = ['present', 'absent'],
type = 'str' type = 'str'
) )

View file

@ -18,6 +18,8 @@
username: "{{ mt_user }}" username: "{{ mt_user }}"
password: "{{ mt_pass }}" password: "{{ mt_pass }}"
state: present state: present
parameter: scheduler
settings:
name: ansible_test name: ansible_test
on_event: 'put "test"' on_event: 'put "test"'
interval: 5s interval: 5s
@ -31,6 +33,7 @@
) and ( ) and (
not ( scheduler_mod | changed ) not ( scheduler_mod | changed )
) )
tags: test1
- name: NEVER_CHANGES add duplicate scheduler - name: NEVER_CHANGES add duplicate scheduler
mt_system_scheduler: mt_system_scheduler:
@ -38,6 +41,8 @@
username: "{{ mt_user }}" username: "{{ mt_user }}"
password: "{{ mt_pass }}" password: "{{ mt_pass }}"
state: present state: present
parameter: scheduler
settings:
name: ansible_test name: ansible_test
on_event: 'put "test"' on_event: 'put "test"'
interval: 5s interval: 5s
@ -51,6 +56,7 @@
) and ( ) and (
( scheduler_dup | changed ) ( scheduler_dup | changed )
) )
tags: test1
- name: ALWAYS_CHANGES remove duplicate scheduler - name: ALWAYS_CHANGES remove duplicate scheduler
mt_system_scheduler: mt_system_scheduler:
@ -58,6 +64,8 @@
username: "{{ mt_user }}" username: "{{ mt_user }}"
password: "{{ mt_pass }}" password: "{{ mt_pass }}"
state: absent state: absent
parameter: scheduler
settings:
name: ansible_test name: ansible_test
register: scheduler_rem register: scheduler_rem
failed_when: ( failed_when: (
@ -65,3 +73,4 @@
) and ( ) and (
not ( scheduler_rem | changed ) not ( scheduler_rem | changed )
) )
tags: test1