Kostiantyn Kalynovskyi d7df2fb571 Moving roles from zuul-airship-roles.
Changes is needed because we can not make dependencies on PRs from
other repositories such as zuul-airship-roles, this would allow more
robust development in the stage we currently are in. When there will
be less activity on gating roles will be moved back to separate repo.

Change-Id: I85c9bdd47b5aaba90df5458b20c90ff5c912c05f
2020-02-12 22:52:17 +00:00

30 lines
822 B
YAML

- name: Include test variables.
include_vars:
file: vars.yml
- name: ensure serve directory exists
file:
path: "{{ http_fileserver_serve_dir }}"
state: directory
mode: "0755"
become: true
- name: install http-fileserver
include_role:
name: http-fileserver
- name: trigger all saved handlers
meta: flush_handlers
- name: copy test file to serve directory
become: true
copy:
content: "{{ http_file_server_test_file_content }}"
dest: "{{ http_fileserver_serve_dir }}/{{ http_fileserver_test_file_name }}"
register: file_copy_command
- name: download test file
get_url:
url: "http://localhost:{{ http_fileserver_serve_port }}/{{ http_fileserver_test_file_name }}"
dest: "/tmp/{{ http_fileserver_test_file_name }}"
checksum: "sha1:{{ file_copy_command.checksum }}"