Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654 Change-Id: I70349036d45f44b7d951224fa2d27fe417301d87
This commit is contained in:
parent
8f0af19ca7
commit
2dc4709537
|
@ -26,7 +26,7 @@ debug: False
|
||||||
# for the service setup. The host must already have
|
# for the service setup. The host must already have
|
||||||
# clouds.yaml properly configured.
|
# clouds.yaml properly configured.
|
||||||
heat_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
|
heat_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
|
||||||
heat_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((heat_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}"
|
heat_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((heat_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
||||||
|
|
||||||
# Set the package install state for distribution packages
|
# Set the package install state for distribution packages
|
||||||
# Options are 'present' and 'latest'
|
# Options are 'present' and 'latest'
|
||||||
|
@ -55,7 +55,7 @@ heat_clients_heat_endpoint: publicURL
|
||||||
|
|
||||||
## Database info
|
## Database info
|
||||||
heat_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
|
heat_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
|
||||||
heat_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((heat_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}"
|
heat_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((heat_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
||||||
heat_galera_address: "{{ galera_address | default('127.0.0.1') }}"
|
heat_galera_address: "{{ galera_address | default('127.0.0.1') }}"
|
||||||
heat_galera_user: heat
|
heat_galera_user: heat
|
||||||
heat_galera_database: heat
|
heat_galera_database: heat
|
||||||
|
@ -179,7 +179,7 @@ heat_metadata_server_url: "{{ heat_cfn_service_publicuri_proto }}://{{ external_
|
||||||
|
|
||||||
## Cap the maximum number of threads / workers when a user value is unspecified.
|
## Cap the maximum number of threads / workers when a user value is unspecified.
|
||||||
heat_api_threads_max: 16
|
heat_api_threads_max: 16
|
||||||
heat_api_threads: "{{ [[(ansible_processor_vcpus//ansible_processor_threads_per_core)|default(1), 1] | max * 2, heat_api_threads_max] | min }}"
|
heat_api_threads: "{{ [[(ansible_facts['processor_vcpus']//ansible_facts['processor_threads_per_core'])|default(1), 1] | max * 2, heat_api_threads_max] | min }}"
|
||||||
|
|
||||||
heat_service_in_ldap: "{{ service_ldap_backend_enabled | default(False) }}"
|
heat_service_in_ldap: "{{ service_ldap_backend_enabled | default(False) }}"
|
||||||
|
|
||||||
|
@ -271,7 +271,7 @@ heat_required_secrets:
|
||||||
heat_api_uwsgi_ini_overrides: {}
|
heat_api_uwsgi_ini_overrides: {}
|
||||||
heat_api_cfn_uwsgi_ini_overrides: {}
|
heat_api_cfn_uwsgi_ini_overrides: {}
|
||||||
heat_wsgi_processes_max: 16
|
heat_wsgi_processes_max: 16
|
||||||
heat_wsgi_processes: "{{ [[ansible_processor_vcpus|default(1), 1] | max * 2, heat_wsgi_processes_max] | min }}"
|
heat_wsgi_processes: "{{ [[ansible_facts['processor_vcpus']|default(1), 1] | max * 2, heat_wsgi_processes_max] | min }}"
|
||||||
heat_wsgi_threads: 1
|
heat_wsgi_threads: 1
|
||||||
heat_api_uwsgi_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}"
|
heat_api_uwsgi_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}"
|
||||||
heat_api_cfn_uwsgi_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}"
|
heat_api_cfn_uwsgi_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}"
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
name: "{{ item.service_name }}"
|
name: "{{ item.service_name }}"
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: "restarted"
|
state: "restarted"
|
||||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
daemon_reload: yes
|
||||||
with_items: "{{ filtered_heat_services }}"
|
with_items: "{{ filtered_heat_services }}"
|
||||||
listen:
|
listen:
|
||||||
- "venv changed"
|
- "venv changed"
|
||||||
|
|
|
@ -39,4 +39,4 @@ galaxy_info:
|
||||||
dependencies:
|
dependencies:
|
||||||
- role: apt_package_pinning
|
- role: apt_package_pinning
|
||||||
when:
|
when:
|
||||||
- ansible_pkg_mgr == 'apt'
|
- ansible_facts['pkg_mgr'] == 'apt'
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
package:
|
package:
|
||||||
name: "{{ heat_package_list }}"
|
name: "{{ heat_package_list }}"
|
||||||
state: "{{ heat_package_state }}"
|
state: "{{ heat_package_state }}"
|
||||||
update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}"
|
update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"
|
||||||
cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}"
|
cache_valid_time: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary(cache_timeout, omit) }}"
|
||||||
register: install_packages
|
register: install_packages
|
||||||
until: install_packages is success
|
until: install_packages is success
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|
|
@ -26,11 +26,11 @@
|
||||||
- name: Gather variables for each operating system
|
- name: Gather variables for each operating system
|
||||||
include_vars: "{{ item }}"
|
include_vars: "{{ item }}"
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -65,10 +65,10 @@ heat_uwsgi_services: |-
|
||||||
|
|
||||||
heat_core_files:
|
heat_core_files:
|
||||||
- tmp_f: "/tmp/api-paste.ini"
|
- tmp_f: "/tmp/api-paste.ini"
|
||||||
target_f: "{{ (heat_install_method == 'distro' and ansible_os_family == 'RedHat') | ternary('/usr/share/heat', '/etc/heat') }}/api-paste.ini"
|
target_f: "{{ (heat_install_method == 'distro' and ansible_facts['os_family'] == 'RedHat') | ternary('/usr/share/heat', '/etc/heat') }}/api-paste.ini"
|
||||||
config_overrides: "{{ heat_api_paste_ini_overrides }}"
|
config_overrides: "{{ heat_api_paste_ini_overrides }}"
|
||||||
config_type: "ini"
|
config_type: "ini"
|
||||||
condition: "{{ not ((heat_install_method == 'distro') and ((ansible_os_family | lower) == 'redhat')) }}"
|
condition: "{{ not ((heat_install_method == 'distro') and ((ansible_facts['os_family'] | lower) == 'redhat')) }}"
|
||||||
- tmp_f: "/tmp/default.yaml"
|
- tmp_f: "/tmp/default.yaml"
|
||||||
target_f: "/etc/heat/environment.d/default.yaml"
|
target_f: "/etc/heat/environment.d/default.yaml"
|
||||||
config_overrides: "{{ heat_default_yaml_overrides }}"
|
config_overrides: "{{ heat_default_yaml_overrides }}"
|
||||||
|
|
Loading…
Reference in New Issue