Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions roles/_init/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,27 @@
- name: Define image builds base path.
ansible.builtin.set_fact:
build_base_path: "/home/{{ deploy_user }}/builds/{{ project_name }}_{{ build_type }}"
when: deploy_code.mount_type == "squashfs"
when:
- deploy_code.mount_type is defined
- deploy_code.mount_type == "squashfs"
- name: Define image builds build path prefix.
ansible.builtin.set_fact:
build_path_prefix: "{{ build_base_path }}/{{ project_name }}_{{ build_type }}_build_"
when: deploy_code.mount_type == "squashfs"
when:
- deploy_code.mount_type is defined
- deploy_code.mount_type == "squashfs"
- name: Define live_symlink dest for image builds.
ansible.builtin.set_fact:
live_symlink_build_dest: "{{ live_symlink_build_dest | default('{{ build_base_path }}/live.{{ project_name }}_{{ build_type }}') }}"
when: deploy_code.mount_type == "squashfs"
when:
- deploy_code.mount_type is defined
- deploy_code.mount_type == "squashfs"
- name: Overwrite deploy and live_symlink paths if SquashFS deploy.
ansible.builtin.set_fact:
deploy_path: "{{ build_path | default('{{ build_path_prefix }}{{ build_number }}') }}"
when: deploy_code.mount_type == "squashfs"
when:
- deploy_code.mount_type is defined
- deploy_code.mount_type == "squashfs"

# Gather last known good build directly from symlink.
# This can happen:
Expand Down Expand Up @@ -80,7 +88,9 @@
ansible.builtin.file:
path: "{{ build_base_path }}"
state: directory
when: deploy_code.mount_type == "squashfs"
when:
- deploy_code.mount_type is defined
- deploy_code.mount_type == "squashfs"

# Check for project specific init tasks.
- name: Check that {{ project_type }}.yml exists.
Expand Down