Fix check for host-specific git vars file before including

This commit is contained in:
2026-03-27 11:59:40 +01:00
parent 816c64783e
commit 71f429d8aa

View File

@@ -331,12 +331,17 @@
# ---
# Read in host specific vars file if exists
- name: (git.yml) Check for host specific git vars file
stat:
path: "vars/git-{{ inventory_hostname }}.yml"
register: git_host_vars_file
tags:
- git-other-repositories
- name: (git.yml) Include only files matching git-<hostname>.yml (2.2)
include_vars:
dir: vars
extensions:
- yml
files_matching: "git-{{ inventory_hostname }}.yml"
file: "vars/git-{{ inventory_hostname }}.yml"
when: git_host_vars_file.stat.exists
tags:
- git-other-repositories