Fix ansible-test windows-integration module refs.

pull/68298/head
Matt Clay 5 years ago committed by Matt Martz
parent a63dd92a45
commit 2c7f8bf586

@ -0,0 +1,2 @@
bugfixes:
- ansible-test now uses modules from the ``ansible.windows`` collection for setup and teardown of ``windows-integration`` tests and code coverage

@ -4,12 +4,12 @@
gather_facts: no
tasks:
- name: create temp directory
win_file:
ansible.windows.win_file:
path: '{{ remote_temp_path }}'
state: directory
- name: allow everyone to write to coverage test dir
win_acl:
ansible.windows.win_acl:
path: '{{ remote_temp_path }}'
user: Everyone
rights: Modify

@ -2,6 +2,10 @@
- name: collect the coverage files from the Windows host
hosts: windows
gather_facts: no
# The collections keyword is required to allow fetch to work.
# See: https://github.com/ansible/ansible/issues/68269
collections:
- ansible.windows
tasks:
- name: make sure all vars have been set
assert:
@ -10,7 +14,7 @@
- remote_temp_path is defined
- name: zip up all coverage files in the
win_shell: |
ansible.windows.win_shell: |
$coverage_dir = '{{ remote_temp_path }}'
$zip_file = Join-Path -Path $coverage_dir -ChildPath 'coverage.zip'
if (Test-Path -LiteralPath $zip_file) {
@ -72,6 +76,6 @@
flat: yes
- name: remove the temporary coverage directory
win_file:
ansible.windows.win_file:
path: '{{ remote_temp_path }}'
state: absent

@ -76,7 +76,7 @@ class ManageWindowsCI:
name = 'windows_%s' % self.core_ci.version
env = ansible_environment(self.core_ci.args)
cmd = ['ansible', '-m', 'win_ping', '-i', '%s,' % name, name, '-e', ' '.join(extra_vars)]
cmd = ['ansible', '-m', 'ansible.windows.win_ping', '-i', '%s,' % name, name, '-e', ' '.join(extra_vars)]
for dummy in range(1, 120):
try:

Loading…
Cancel
Save