ansible/test/integration/targets/win_get_url/tasks/main.yml
ShachafGoldstein 8e2bff407a Change S3 bucket urls to new method as per #56124 (#56418)
* Change S3 bucket urls to new method as per #56124

* duplicate / and dded changelog fragment

* Revert "duplicate / and dded changelog fragment"

This reverts commit b89d5cbe6d.

* duplicate /
2019-05-14 20:50:56 -04:00

61 lines
1.5 KiB
YAML

---
- name: set fact out special testing dir
set_fact:
testing_dir: '{{ remote_tmp_dir }}\win_get_url .ÅÑŚÌβŁÈ [$!@^&test(;)]'
- name: create test directory with space and special chars
win_file:
path: '{{ testing_dir }}'
state: directory
- name: copy across testing files
win_copy:
src: files/
dest: '{{ testing_dir }}'
- name: download SlimFTPd binary
win_get_url:
url: https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_win_get_url/SlimFTPd.exe
dest: '{{ testing_dir }}\SlimFTPd.exe'
# SlimFTPd does not work with special chars because it is so old, use a symlink as a workaround
- name: set fact of temp symlink for SlimFTPd
set_fact:
slimftpd_link: C:\SlimFTPd
- name: template SlimFTPd configuration file
win_template:
src: slimftpd.conf.tmpl
dest: '{{ testing_dir }}\slimftpd.conf'
- block:
- name: create SLimFTPd symlink
win_command: cmd.exe /c mklink /d "{{ slimftpd_link }}" "{{ testing_dir }}"
- name: create SlimFTPd service
win_service:
name: SlimFTPd
path: '"{{ slimftpd_link }}\SlimFTPd.exe" -service'
state: started
dependencies:
- tcpip
- name: run URL tests
import_tasks: tests_url.yml
- name: run FTP tests
import_tasks: tests_ftp.yml
- name: run checksum tests
import_tasks: tests_checksum.yml
always:
- name: remove SlimFTPd service
win_service:
name: SlimFTPd
state: absent
- name: remove temp symlink
win_file:
path: '{{ slimftpd_link }}'
state: absent