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
11 changes: 6 additions & 5 deletions roles/_init/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,17 @@
ansible.builtin.set_fact:
live_symlink_dest: "{{ live_symlink_dest | default('{{ deploy_base_path }}/live.{{ project_name }}_{{ build_type }}') }}"

- name: Read the live symlink to get the path to the current build.
ansible.builtin.stat:
path: "{{ live_symlink_dest }}"
register: _current_build_path

- name: Stop the build if track file value doesn't match current build.
when:
- deploy_operation == 'deploy'
- previous_build_number > 0
- _current_build_path.stat.islnk is defined
block:
- name: Read the live symlink to get the path to the current build.
ansible.builtin.stat:
path: "{{ live_symlink_dest }}"
register: _current_build_path

- name: Grab the link target build ID with regex.
ansible.builtin.set_fact:
_current_build_id: "{{ _current_build_path.stat.lnk_source | regex_search('.*_([0-9]*)$', '\\1') }}"
Expand Down