github.com/crowdsecurity/crowdsec@v1.6.1/test/ansible/provision_test_suite.yml (about)

     1  # vim: set ft=yaml.ansible:
     2  ---
     3  
     4  - name: "Fetch the test scripts"
     5    hosts: all
     6    tasks:
     7  
     8      - name: "Fetch the sources from a git repository"
     9        ansible.builtin.include_role:
    10          name: crowdsecurity.testing.download_sources_from_git
    11        when: sources_zip | length == 0
    12  
    13      - name: "Extract the sources from a zip archive"
    14        ansible.builtin.include_role:
    15          name: crowdsecurity.testing.extract_sources_from_zip
    16        when: sources_zip | length > 0
    17  
    18      - name: "Create crowdsec test/local dir"
    19        become: false
    20        ansible.builtin.file:
    21          path: "{{ ansible_env.HOME }}/crowdsec/test/local"
    22          state: directory
    23          mode: 0o755
    24  
    25    vars:
    26      sources_dest_dir: "{{ ansible_env.HOME }}/crowdsec"
    27      sources_git_repo: >-
    28        {{ lookup('ansible.builtin.env', 'TEST_SUITE_GIT')
    29        | default('https://github.com/crowdsecurity/crowdsec', True) }}
    30      sources_git_version: >-
    31        {{ lookup('ansible.builtin.env', 'TEST_SUITE_VERSION')
    32        | default('master', True) }}
    33      sources_zip: >-
    34        {{ lookup('ansible.builtin.env', 'TEST_SUITE_ZIP') }}