Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654 Change-Id: I1f848a2d08be7975a1bde9832fea1e29f5e7b410
This commit is contained in:
parent
5a3cf2607e
commit
73863b9083
|
@ -21,7 +21,7 @@ panko_venv_python_executable: "{{ openstack_venv_python_executable | default('py
|
|||
# for the service setup. The host must already have
|
||||
# clouds.yaml properly configured.
|
||||
panko_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
|
||||
panko_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((panko_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}"
|
||||
panko_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((panko_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
||||
|
||||
# Set the package install state for distribution packages
|
||||
# Options are 'present' and 'latest'
|
||||
|
@ -51,7 +51,7 @@ panko_system_user_home: "/var/lib/{{ panko_system_user_name }}"
|
|||
|
||||
## DB info
|
||||
panko_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
|
||||
panko_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((panko_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}"
|
||||
panko_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((panko_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
||||
panko_database_name: panko
|
||||
panko_database_user: panko
|
||||
panko_db_type: "mysql+pymysql"
|
||||
|
@ -64,7 +64,7 @@ panko_galera_port: "{{ galera_port | default('3306') }}"
|
|||
panko_api_init_overrides: {}
|
||||
panko_wsgi_threads: 10
|
||||
panko_wsgi_processes_max: 16
|
||||
panko_wsgi_processes: "{{ [[(ansible_processor_vcpus//ansible_processor_threads_per_core)|default(1), 1] | max * 2, panko_wsgi_processes_max] | min }}"
|
||||
panko_wsgi_processes: "{{ [[(ansible_facts['processor_vcpus']//ansible_facts['processor_threads_per_core'])|default(1), 1] | max * 2, panko_wsgi_processes_max] | min }}"
|
||||
|
||||
#panko services info
|
||||
panko_role_name: admin
|
||||
|
|
|
@ -76,5 +76,5 @@
|
|||
name: "{{ panko_system_service_name }}"
|
||||
enabled: yes
|
||||
state: "restarted"
|
||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
||||
daemon_reload: yes
|
||||
failed_when: false
|
||||
|
|
|
@ -40,4 +40,4 @@ galaxy_info:
|
|||
dependencies:
|
||||
- role: apt_package_pinning
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
- ansible_facts['pkg_mgr'] == 'apt'
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
- name: Gather variables for each operating system
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
||||
- "{{ ansible_distribution | lower }}.yml"
|
||||
- "{{ ansible_os_family | lower }}.yml"
|
||||
- "{{ 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 }}.yml"
|
||||
tags:
|
||||
- always
|
||||
|
||||
|
|
Loading…
Reference in New Issue