Fix ansible-test windows-integration module refs.

This commit is contained in:
Matt Clay 2020-03-16 16:38:47 -07:00 committed by Matt Martz
parent a63dd92a45
commit 2c7f8bf586
13 changed files with 20 additions and 5 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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:

View file

@ -0,0 +1 @@
../../../../../../plugins/action/win_copy.py

View file

@ -0,0 +1 @@
../../../../../../plugins/modules/win_acl.ps1

View file

@ -0,0 +1 @@
../../../../../../plugins/modules/win_acl.py

View file

@ -0,0 +1 @@
../../../../../../plugins/modules/win_file.ps1

View file

@ -0,0 +1 @@
../../../../../../plugins/modules/win_file.py

View file

@ -0,0 +1 @@
../../../../../../plugins/modules/win_ping.ps1

View file

@ -0,0 +1 @@
../../../../../../plugins/modules/win_ping.py

View file

@ -0,0 +1 @@
../../../../../../plugins/modules/win_shell.ps1

View file

@ -0,0 +1 @@
../../../../../../plugins/modules/win_shell.py