From 051a61593be6fbcc101210452a6aa2b2f718cbf8 Mon Sep 17 00:00:00 2001 From: Guillaume Coré <gucore@redhat.com> Date: Wed, 12 Feb 2020 09:09:28 +0100 Subject: [PATCH] Support ansible_python_interpreter tag / metadata (#1138) --- ansible/include_vars.yml | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/ansible/include_vars.yml b/ansible/include_vars.yml index f0c37e1..b28d4fb 100644 --- a/ansible/include_vars.yml +++ b/ansible/include_vars.yml @@ -1,16 +1,9 @@ --- -- hosts: - - localhost - - all +- hosts: localhost connection: local gather_facts: no tags: include_vars tasks: - - name: Set output_dir for all hosts - set_fact: - output_dir: "{{ hostvars.localhost.output_dir }}" - when: hostvars.localhost.output_dir is defined - - name: Stat default variables files (both yaml/yml extensions) vars: find_me: @@ -43,13 +36,26 @@ loop: "{{ find_me }}" register: rstat2_varfiles + +- hosts: + - localhost + - all + connection: local + gather_facts: no + tags: include_vars + tasks: + - name: Set output_dir for all hosts + set_fact: + output_dir: "{{ hostvars.localhost.output_dir }}" + when: hostvars.localhost.output_dir is defined + - name: Include variables files include_vars: file: "{{ item.stat.path }}" when: - item is not skipped - item.stat.exists - loop: "{{ rstat_varfiles.results + rstat2_varfiles.results }}" + loop: "{{ hostvars.localhost.rstat_varfiles.results + hostvars.localhost.rstat2_varfiles.results }}" loop_control: label: >- {{ ( -- Gitblit v1.9.3