Force local stat for third-party prep tasks

This commit is contained in:
2026-01-02 19:15:34 +01:00
parent 1cc1966b97
commit 2d4127a688

View File

@@ -153,19 +153,27 @@
mode: "0644" mode: "0644"
- name: Check for third-party preparation tasks - name: Check for third-party preparation tasks
ansible.builtin.stat:
path: >-
{{
thirdparty_preparation_tasks_path
if thirdparty_preparation_tasks_path | regex_search('^/')
else playbook_dir + '/' + thirdparty_preparation_tasks_path
}}
delegate_to: localhost
connection: local
become: false
run_once: true run_once: true
register: environment_thirdparty_tasks_stat become: false
changed_when: false delegate_to: localhost
vars:
ansible_connection: local
block:
- name: Resolve third-party preparation task path
ansible.builtin.set_fact:
environment_thirdparty_tasks_path: >-
{{
thirdparty_preparation_tasks_path
if thirdparty_preparation_tasks_path | regex_search('^/')
else playbook_dir + '/' + thirdparty_preparation_tasks_path
}}
changed_when: false
- name: Stat third-party preparation tasks
ansible.builtin.stat:
path: "{{ environment_thirdparty_tasks_path }}"
register: environment_thirdparty_tasks_stat
changed_when: false
- name: Run third-party preparation tasks - name: Run third-party preparation tasks
when: when: