2017-07-19 03:44:01 +00:00
|
|
|
- name: call old WANTS_JSON module
|
|
|
|
legacy_only_old_way:
|
|
|
|
register: old_way
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- old_way.data == 'success'
|
|
|
|
|
|
|
|
- name: call module with only legacy requires
|
|
|
|
legacy_only_new_way:
|
|
|
|
register: new_way
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- new_way.data == 'success'
|
|
|
|
|
|
|
|
- name: call module with local module_utils
|
|
|
|
uses_local_utils:
|
|
|
|
register: local_utils
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- local_utils.data == "ValueFromCustomFunction"
|
|
|
|
|
|
|
|
- name: call module that imports bogus Ansible-named module_utils
|
|
|
|
uses_bogus_utils:
|
|
|
|
ignore_errors: true
|
|
|
|
register: bogus_utils
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- bogus_utils | failed
|
|
|
|
- bogus_utils.msg | search("Could not find")
|
2017-07-19 23:57:05 +00:00
|
|
|
|
|
|
|
- name: call module with camel conversion tests
|
|
|
|
camel_conversion_test:
|
|
|
|
register: camel_conversion
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- camel_conversion.data == 'success'
|
2017-08-28 23:15:58 +00:00
|
|
|
|
|
|
|
- name: call module with SID tests
|
|
|
|
sid_utils_test:
|
|
|
|
register: sid_test
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- sid_test.data == 'success'
|
2017-09-13 16:58:49 +00:00
|
|
|
|
|
|
|
- name: create testing folder for argv binary
|
|
|
|
win_file:
|
|
|
|
path: C:\ansible testing
|
|
|
|
state: directory
|
|
|
|
|
|
|
|
- name: download binary the outputs argv to stdout
|
|
|
|
win_get_url:
|
|
|
|
url: https://s3.amazonaws.com/ansible-ci-files/test/integration/roles/test_win_module_utils/PrintArgv.exe
|
|
|
|
dest: C:\ansible testing\PrintArgv.exe
|
|
|
|
|
|
|
|
- name: call module with CommandUtil tests
|
|
|
|
command_util_test:
|
|
|
|
exe: C:\ansible testing\PrintArgv.exe
|
|
|
|
register: command_util
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- command_util.data == 'success'
|
|
|
|
|
|
|
|
- name: remove testing folder
|
|
|
|
win_file:
|
|
|
|
path: C:\ansible testing
|
|
|
|
state: absent
|