summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/prepare_http_tests/tasks/windows.yml
blob: da8b0eb3d094bc0a9b5cfea9c4b0503dd276b938 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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