diff --git a/tripleo_ansible/roles/tripleo_bootstrap/tasks/packages.yml b/tripleo_ansible/roles/tripleo_bootstrap/tasks/packages.yml index 3de167b32..c503355c0 100644 --- a/tripleo_ansible/roles/tripleo_bootstrap/tasks/packages.yml +++ b/tripleo_ansible/roles/tripleo_bootstrap/tasks/packages.yml @@ -14,27 +14,27 @@ # License for the specific language governing permissions and limitations # under the License. -- name: Gather facts and variables if they don't exist - block: - - name: Gather facts if they don't exist - setup: - gather_subset: min +- name: Gather facts if they don't exist + setup: + gather_subset: min + when: ansible_distribution is undefined + tags: + - always # found within the "vars/" path. If no OS files are found the task will skip. - - name: Gather variables for each operating system - include_vars: "{{ item }}" - with_first_found: - - skip: true - files: - - "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml" - - "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml" - - "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml" - - "{{ ansible_facts['distribution'] | lower }}.yml" - - "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml" - - "{{ ansible_facts['os_family'] | lower }}.yml" - tags: - - always - when: not ansible_distribution|default(false) +- name: Gather variables for each operating system + include_vars: "{{ item }}" + with_first_found: + - skip: true + files: + - "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml" + - "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml" + - "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml" + - "{{ ansible_facts['distribution'] | lower }}.yml" + - "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml" + - "{{ ansible_facts['os_family'] | lower }}.yml" + tags: + - always - name: Check required packages to bootstrap TripleO is installed command: "rpm -q --whatprovides {{ tripleo_bootstrap_packages_bootstrap | join(' ') }}"