diff --git a/roles/common/tasks/git.yml b/roles/common/tasks/git.yml index 51d0ae5..578f30c 100644 --- a/roles/common/tasks/git.yml +++ b/roles/common/tasks/git.yml @@ -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-.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