docker-scripts/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.8.jdk8-11.yml
2024-12-05 01:23:31 +03:00

60 lines
2.0 KiB
YAML

- name: Read versions from file
slurp:
src: "roles/common/files/versions/bitbucket/8.jdk8-11.txt"
register: version_output
- name: Set version variable
set_fact:
bitbucket_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}"
- name: Create directories for Bitbucket versions
file:
path: "{{ target_directory_bitbucket_8 }}/{{ item }}"
state: directory
mode: '0755'
force: true
with_items: "{{ bitbucket_versions }}"
- name: Copy .env with link from template to each version directory
template:
src: "env/template.bitbucket.4-9.env.j2"
dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/.env"
force: true
with_items: "{{ bitbucket_versions }}"
- name: Copy docker-compose.yml from template to each version directory
template:
src: "docker-compose/template.docker-compose.jdk8-11.yml.j2"
dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/docker-compose.yml"
force: true
with_items: "{{ bitbucket_versions }}"
- name: Copy Dockerfile from template to each version directory
template:
src: "dockerfile/template.Dockerfile.jdk8.j2"
dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/Dockerfile"
force: true
with_items: "{{ bitbucket_versions }}"
- name: Copy Dockerfile.jdk11 from template to each version directory
template:
src: "dockerfile/template.Dockerfile.jdk11.j2"
dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/Dockerfile.jdk11"
force: true
with_items: "{{ bitbucket_versions }}"
- name: Copy entrypoint.sh from 'files' directory to each version directory
copy:
src: "entrypoint.sh"
dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/entrypoint.sh"
mode: "0777"
force: true
with_items: "{{ bitbucket_versions }}"
- name: Copy Makefile from 'files' directory to each version directory
copy:
src: "Makefile"
dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/Makefile"
force: true
with_items: "{{ bitbucket_versions }}"