| 1 |
- name: run integration tests on Windows |
| 2 |
hosts: SERVER2012R2 |
| 3 |
gather_facts: no |
| 4 |
tags: |
| 5 |
- windows |
| 6 |
|
| 7 |
tasks: |
| 8 |
- name: template out tests |
| 9 |
win_template: |
| 10 |
src: test_integration.py.tmpl |
| 11 |
dest: C:\temp\test_integration.py |
| 12 |
block_start_string: '{!!' |
| 13 |
block_end_string: '!!}' |
| 14 |
|
| 15 |
- name: run integration tests as a normal user account |
| 16 |
win_command: '"{{ python_venv_path }}\{{ item | win_basename }}\Scripts\python.exe" -m pytest C:\temp\test_integration.py -v' |
| 17 |
with_items: '{{ python_interpreters }}' |
| 18 |
become: yes |
| 19 |
become_method: runas |
| 20 |
vars: |
| 21 |
ansible_become_user: '{{ domain_upn }}' |
| 22 |
ansible_become_pass: '{{ domain_password }}' |
| 23 |
|
| 24 |
- name: run integration tests as the SYSTEM account |
| 25 |
win_command: '"{{ python_venv_path }}\{{ item | win_basename }}\Scripts\python.exe" -m pytest C:\temp\test_integration.py -v' |
| 26 |
with_items: '{{ python_interpreters }}' |
| 27 |
become: yes |
| 28 |
become_method: runas |
| 29 |
become_user: SYSTEM |
| 30 |
|
| 31 |
- name: run integration tests on Linux |
| 32 |
hosts: linux_children |
| 33 |
gather_facts: no |
| 34 |
tags: |
| 35 |
- linux |
| 36 |
|
| 37 |
tasks: |
| 38 |
- name: template out tests |
| 39 |
template: |
| 40 |
src: test_integration.py.tmpl |
| 41 |
dest: ~/test_integration.py |
| 42 |
block_start_string: '{!!' |
| 43 |
block_end_string: '!!}' |
| 44 |
|
| 45 |
- name: run integration tests |
| 46 |
command: '"{{ python_venv_path }}/{{ item | basename }}/bin/python" -m pytest ~/test_integration.py -v --forked' |
| 47 |
with_items: '{{ python_interpreters }}' |