Fix check for host-specific git vars file before including
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user