2022-09-06 09:33:50 +00:00
|
|
|
# vim: set ft=yaml.ansible:
|
2022-07-26 11:09:13 +00:00
|
|
|
---
|
2022-09-12 14:07:14 +00:00
|
|
|
|
|
|
|
- name: "Fetch the test scripts"
|
2022-07-26 11:09:13 +00:00
|
|
|
hosts: all
|
2022-09-12 14:07:14 +00:00
|
|
|
tasks:
|
|
|
|
|
|
|
|
- name: "Fetch the sources from a git repository"
|
|
|
|
ansible.builtin.include_role:
|
|
|
|
name: crowdsecurity.testing.download_sources_from_git
|
|
|
|
when: sources_zip | length == 0
|
|
|
|
|
|
|
|
- name: "Extract the sources from a zip archive"
|
|
|
|
ansible.builtin.include_role:
|
|
|
|
name: crowdsecurity.testing.extract_sources_from_zip
|
|
|
|
when: sources_zip | length > 0
|
|
|
|
|
2023-03-03 14:54:49 +00:00
|
|
|
- name: "Create crowdsec test/local dir"
|
2022-09-12 14:07:14 +00:00
|
|
|
become: false
|
|
|
|
ansible.builtin.file:
|
2023-03-03 14:54:49 +00:00
|
|
|
path: "{{ ansible_env.HOME }}/crowdsec/test/local"
|
2022-09-12 14:07:14 +00:00
|
|
|
state: directory
|
|
|
|
mode: 0o755
|
|
|
|
|
|
|
|
vars:
|
|
|
|
sources_dest_dir: "{{ ansible_env.HOME }}/crowdsec"
|
|
|
|
sources_git_repo: >-
|
|
|
|
{{ lookup('ansible.builtin.env', 'TEST_SUITE_GIT')
|
|
|
|
| default('https://github.com/crowdsecurity/crowdsec', True) }}
|
|
|
|
sources_git_version: >-
|
|
|
|
{{ lookup('ansible.builtin.env', 'TEST_SUITE_VERSION')
|
|
|
|
| default('master', True) }}
|
|
|
|
sources_zip: >-
|
|
|
|
{{ lookup('ansible.builtin.env', 'TEST_SUITE_ZIP') }}
|