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