Force local stat for third-party prep tasks
This commit is contained in:
@@ -153,17 +153,25 @@
|
|||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
|
||||||
- name: Check for third-party preparation tasks
|
- name: Check for third-party preparation tasks
|
||||||
ansible.builtin.stat:
|
run_once: true
|
||||||
path: >-
|
become: 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
|
thirdparty_preparation_tasks_path
|
||||||
if thirdparty_preparation_tasks_path | regex_search('^/')
|
if thirdparty_preparation_tasks_path | regex_search('^/')
|
||||||
else playbook_dir + '/' + thirdparty_preparation_tasks_path
|
else playbook_dir + '/' + thirdparty_preparation_tasks_path
|
||||||
}}
|
}}
|
||||||
delegate_to: localhost
|
changed_when: false
|
||||||
connection: local
|
|
||||||
become: false
|
- name: Stat third-party preparation tasks
|
||||||
run_once: true
|
ansible.builtin.stat:
|
||||||
|
path: "{{ environment_thirdparty_tasks_path }}"
|
||||||
register: environment_thirdparty_tasks_stat
|
register: environment_thirdparty_tasks_stat
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user