Update test_sms.yml
This commit is contained in:
23
test_sms.yml
23
test_sms.yml
@@ -16,27 +16,22 @@
|
||||
|
||||
- name: Send SMS message
|
||||
uri:
|
||||
url: >-
|
||||
https://sms.internet-master.cz/send/?number={{ sms_number }}&message={{ random_string | urlencode }}&type=class-1&username={{ sms_username }}&password={{ sms_password_send }}
|
||||
url: "https://sms.internet-master.cz/send/?number={{ sms_number }}&message={{ random_string | urlencode }}&type=class-1&username={{ sms_username }}&password={{ sms_password_send }}"
|
||||
method: GET
|
||||
return_content: true
|
||||
register: send_result
|
||||
|
||||
- name: Fetch received messages
|
||||
uri:
|
||||
url: >-
|
||||
https://sms.internet-master.cz/receive/
|
||||
?username={{ sms_username }}
|
||||
&password={{ sms_password_recv }}
|
||||
method: GET
|
||||
return_content: true
|
||||
register: recv_result
|
||||
- name: Show send API response
|
||||
debug:
|
||||
var: send_result.content
|
||||
|
||||
- name: Wait for SMS to be delivered
|
||||
pause:
|
||||
seconds: "{{ sms_wait_seconds }}"
|
||||
|
||||
- name: Fetch received messages
|
||||
uri:
|
||||
url: >-
|
||||
https://sms.internet-master.cz/receive/?username={{sms_username}}&password={{sms_password_recv}}
|
||||
url: "https://sms.internet-master.cz/receive/?username={{ sms_username }}&password={{ sms_password_recv }}"
|
||||
method: GET
|
||||
return_content: true
|
||||
register: recv_result
|
||||
@@ -59,4 +54,4 @@
|
||||
- name: Fail if not delivered
|
||||
fail:
|
||||
msg: "Message '{{ random_string }}' not found in received inbox!"
|
||||
when: not message_found
|
||||
when: not message_found
|
||||
|
||||
Reference in New Issue
Block a user