- name: Read versions from file testrail.php72.txt slurp: src: "roles/common/files/versions/testrail/testrail.php72.txt" register: version_output - name: Set version variable set_fact: testrail_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}" - name: Create directories for Testrail versions with php72 file: path: "{{ target_directory }}/{{ item }}" state: directory mode: '0755' with_items: "{{ testrail_versions }}" - name: Copy all files from 'files' directory to each version directory copy: src: "php72/" dest: "{{ target_directory }}/{{ item }}/" with_items: "{{ testrail_versions }}" # no_log: true - name: Copy template with link to each version directory template: src: "template.env.php72.j2" dest: "{{ target_directory }}/{{ item }}/main/.env" with_items: "{{ testrail_versions }}" - name: Copy main template docker-compose.yml to each version directory template: src: "php72/main/docker-compose.yml.j2" dest: "{{ target_directory }}/{{ item }}/main/docker-compose.yml" with_items: "{{ testrail_versions }}" - name: Copy main template docker-entrypoint.sh to each version directory template: src: "php72/main/docker-entrypoint.sh.j2" dest: "{{ target_directory }}/{{ item }}/main/docker-entrypoint.sh" with_items: "{{ testrail_versions }}" - name: Copy main template Dockerfile to each version directory template: src: "php72/main/Dockerfile.j2" dest: "{{ target_directory }}/{{ item }}/main/Dockerfile" with_items: "{{ testrail_versions }}" - name: Copy main template README.md to each version directory template: src: "php72/main/README.md.j2" dest: "{{ target_directory }}/{{ item }}/main/README.md" with_items: "{{ testrail_versions }}" - name: Copy AD template docker-compose.yml to each version directory template: src: "php72/ad/docker-compose.yml.j2" dest: "{{ target_directory }}/{{ item }}/ad/docker-compose.yml" with_items: "{{ testrail_versions }}" - name: Copy AD template docker-entrypoint.sh to each version directory template: src: "php72/ad/docker-entrypoint.sh.j2" dest: "{{ target_directory }}/{{ item }}/ad/docker-entrypoint.sh" with_items: "{{ testrail_versions }}" - name: Copy AD template Dockerfile to each version directory template: src: "php72/ad/Dockerfile.j2" dest: "{{ target_directory }}/{{ item }}/ad/Dockerfile" with_items: "{{ testrail_versions }}" - name: Copy AD template README.md to each version directory template: src: "php72/ad/README.md.j2" dest: "{{ target_directory }}/{{ item }}/ad/README.md" with_items: "{{ testrail_versions }}" - name: Copy LDAP template docker-compose.yml to each version directory template: src: "php72/ldap/docker-compose.yml.j2" dest: "{{ target_directory }}/{{ item }}/ldap/docker-compose.yml" with_items: "{{ testrail_versions }}" - name: Copy LDAP template docker-entrypoint.sh to each version directory template: src: "php72/ldap/docker-entrypoint.sh.j2" dest: "{{ target_directory }}/{{ item }}/ldap/docker-entrypoint.sh" with_items: "{{ testrail_versions }}" - name: Copy LDAP template Dockerfile to each version directory template: src: "php72/ldap/Dockerfile.j2" dest: "{{ target_directory }}/{{ item }}/ldap/Dockerfile" with_items: "{{ testrail_versions }}" - name: Copy LDAP template README.md to each version directory template: src: "php72/ldap/README.md.j2" dest: "{{ target_directory }}/{{ item }}/ldap/README.md" with_items: "{{ testrail_versions }}"