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
|
# 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)
|
- name: (git.yml) Include only files matching git-<hostname>.yml (2.2)
|
||||||
include_vars:
|
include_vars:
|
||||||
dir: vars
|
file: "vars/git-{{ inventory_hostname }}.yml"
|
||||||
extensions:
|
when: git_host_vars_file.stat.exists
|
||||||
- yml
|
|
||||||
files_matching: "git-{{ inventory_hostname }}.yml"
|
|
||||||
tags:
|
tags:
|
||||||
- git-other-repositories
|
- git-other-repositories
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user