summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/prepare_http_tests/tasks/windows.yml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/prepare_http_tests/tasks/windows.yml')
-rw-r--r--test/integration/targets/prepare_http_tests/tasks/windows.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/integration/targets/prepare_http_tests/tasks/windows.yml b/test/integration/targets/prepare_http_tests/tasks/windows.yml
new file mode 100644
index 0000000..da8b0eb
--- /dev/null
+++ b/test/integration/targets/prepare_http_tests/tasks/windows.yml
@@ -0,0 +1,33 @@
+# Server 2008 R2 uses a 3rd party program to foward the ports and it may
+# not be ready straight away, we give it at least 5 minutes before
+# conceding defeat
+- name: Windows - make sure the port forwarder is active
+ win_wait_for:
+ host: ansible.http.tests
+ port: 80
+ state: started
+ timeout: 300
+
+- name: Windows - Get client cert/key
+ win_get_url:
+ url: http://ansible.http.tests/{{ item }}
+ dest: '{{ remote_tmp_dir }}\{{ item }}'
+ register: win_download
+ # Server 2008 R2 is slightly slower, we attempt 5 retries
+ retries: 5
+ until: win_download is successful
+ with_items:
+ - client.pem
+ - client.key
+
+- name: Windows - Retrieve test cacert
+ win_get_url:
+ url: http://ansible.http.tests/cacert.pem
+ dest: '{{ remote_tmp_dir }}\cacert.pem'
+
+- name: Windows - Update ca trust
+ win_certificate_store:
+ path: '{{ remote_tmp_dir }}\cacert.pem'
+ state: present
+ store_location: LocalMachine
+ store_name: Root