|
| 1 | +--- |
| 2 | +- name: Gather Cloud Facts |
| 3 | + hosts: localhost |
| 4 | + gather_facts: true |
| 5 | + tasks: |
| 6 | + - name: Write facts to file |
| 7 | + vars: |
| 8 | + cloud_facts: |
| 9 | + ansible_control_host_distribution: "{{ ansible_facts.distribution }}" |
| 10 | + ansible_control_host_distribution_release: "{{ ansible_facts.distribution_release }}" |
| 11 | + openstack_release: "{{ openstack_release }}" |
| 12 | + openstack_release_name: "{{ openstack_release_codename }}" |
| 13 | + ansible_control_host_is_vm: "{{ ansible_facts.virtualization_role == 'guest' }}" |
| 14 | + controller_count: "{{ groups['controllers'] | length }}" |
| 15 | + hypervisor_count: "{{ groups['hypervisors'] | length }}" |
| 16 | + monitoring_count: "{{ groups['monitoring'] | length }}" |
| 17 | + osd_count: "{{ groups['osds'] | length }}" |
| 18 | + compute_count: "{{ groups['compute'] | length }}" |
| 19 | + baremetal_count: "{{ groups['baremetal-compute'] | length }}" |
| 20 | + ceph_deployed: "{{ groups['ceph'] | length > 0 | bool }}" |
| 21 | + ceph_count: "{{ groups['ceph'] | length }}" |
| 22 | + ceph_release: "{{ cephadm_ceph_release }}" |
| 23 | + storage_hyperconverged: "{{ groups['controllers'] | intersect(groups['osds']) | length > 0 | bool }}" |
| 24 | + wazuh_enabled: "{{ groups['wazuh-agent'] | length > 0 | bool }}" |
| 25 | + kayobe_managed_switches: "{{ groups['switches'] | length > 0 | bool }}" |
| 26 | + proxy_configured: "{{ http_proxy | bool or https_proxy | bool }}" |
| 27 | + bifrost_version: "{{ kolla_bifrost_source_version }}" |
| 28 | + barbican_enabled: "{{ kolla_enable_barbican }}" |
| 29 | + nova_enabled: "{{ kolla_enable_nova }}" |
| 30 | + neutron_enabled: "{{ kolla_enable_neutron }}" |
| 31 | + ovs_enabled: "{{ kolla_enable_openvswitch }}" |
| 32 | + ovn_enabled: "{{ kolla_enable_ovn }}" |
| 33 | + glance_enabled: "{{ kolla_enable_glance }}" |
| 34 | + cinder_enabled: "{{ kolla_enable_cinder }}" |
| 35 | + keystone_enabled: "{{ kolla_enable_keystone }}" |
| 36 | + horizon_enabled: "{{ kolla_enable_horizon }}" |
| 37 | + fluentd_enabled: "{{ kolla_enable_fluentd }}" |
| 38 | + rabbitmq_enabled: "{{ kolla_enable_rabbitmq }}" |
| 39 | + mariadb_enabled: "{{ kolla_enable_mariadb }}" |
| 40 | + mariabackup_enabled: "{{ kolla_enable_mariabackup }}" |
| 41 | + memcached_enabled: "{{ kolla_enable_memcached }}" |
| 42 | + haproxy_enabled: "{{ kolla_enable_haproxy }}" |
| 43 | + keepalived_enabled: "{{ kolla_enable_keepalived }}" |
| 44 | + octavia_enabled: "{{ kolla_enable_octavia }}" |
| 45 | + designate_enabled: "{{ kolla_enable_designate }}" |
| 46 | + manila_enabled: "{{ kolla_enable_manila }}" |
| 47 | + magnum_enabled: "{{ kolla_enable_magnum }}" |
| 48 | + heat_enabled: "{{ kolla_enable_heat }}" |
| 49 | + ironic_enabled: "{{ kolla_enable_ironic }}" |
| 50 | + skyline_enabled: "{{ kolla_enable_skyline }}" |
| 51 | + blazar_enabled: "{{ kolla_enable_blazar }}" |
| 52 | + pulp_enabled: "{{ seed_pulp_container_enabled }}" |
| 53 | + opensearch_enabled: "{{ kolla_enable_opensearch }}" |
| 54 | + opensearch_dashboards_enabled: "{{ kolla_enable_opensearch_dashboards }}" |
| 55 | + influxdb_enabled: "{{ kolla_enable_influxdb }}" |
| 56 | + grafana_enabled: "{{ kolla_enable_grafana }}" |
| 57 | + prometheus_enabled: "{{ kolla_enable_prometheus }}" |
| 58 | + cloudkitty_enabled: "{{ kolla_enable_cloudkitty }}" |
| 59 | + telegraf_enabled: "{{ kolla_enable_telegraf }}" |
| 60 | + internal_tls_enabled: "{{ kolla_enable_tls_internal }}" |
| 61 | + external_tls_enabled: "{{ kolla_enable_tls_external }}" |
| 62 | + firewalld_enabled_all: >- |
| 63 | + {{ |
| 64 | + controller_firewalld_enabled and |
| 65 | + compute_firewalld_enabled and |
| 66 | + storage_firewalld_enabled and |
| 67 | + monitoring_firewalld_enabled and |
| 68 | + infra_vm_firewalld_enabled and |
| 69 | + seed_firewalld_enabled and |
| 70 | + seed_hypervisor_firewalld_enabled |
| 71 | + }} |
| 72 | + firewalld_enabled_any: >- |
| 73 | + {{ |
| 74 | + controller_firewalld_enabled or |
| 75 | + compute_firewalld_enabled or |
| 76 | + storage_firewalld_enabled or |
| 77 | + monitoring_firewalld_enabled or |
| 78 | + infra_vm_firewalld_enabled or |
| 79 | + seed_firewalld_enabled or |
| 80 | + seed_hypervisor_firewalld_enabled |
| 81 | + }} |
| 82 | + stackhpc_package_repos_enabled: "{{ stackhpc_repos_enabled }}" |
| 83 | + pulp_tls_enabled: "{{ pulp_enable_tls }}" |
| 84 | + kolla_image_tags: "{{ kolla_image_tags }}" |
| 85 | + ansible.builtin.copy: |
| 86 | + content: "{{ cloud_facts | to_nice_json(sort_keys=false) }}" |
| 87 | + dest: ~/cloud-facts.json |
0 commit comments