tripleo-ansible/tripleo_ansible/playbooks/deploy-tripleo-facts.yml

41 lines
1.4 KiB
YAML

---
# Copyright 2022 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
- hosts: all
name: Clear cached facts
# We don't want to gather facts, just clear them
gather_facts: false
tasks:
- ansible.builtin.meta: clear_facts
tags:
- facts
- hosts: "{{ deploy_source_host | default([]) }}:{{ deploy_target_host | default('overcloud') }}"
name: Gather facts
strategy: tripleo_free
gather_facts: true
tasks:
- name: Set legacy facts
ansible.builtin.set_fact:
ansible_distribution: "{{ ansible_facts['distribution'] }}"
ansible_distribution_major_version: "{{ ansible_facts['distribution_major_version'] }}"
ansible_distribution_release: "{{ ansible_facts['distribution_release'] }}"
ansible_distribution_version: "{{ ansible_facts['distribution_version'] }}"
ansible_os_family: "{{ ansible_facts['os_family'] }}"
tags:
- facts