diff --git a/defaults/main.yml b/defaults/main.yml index 1fae178..6065988 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -24,7 +24,7 @@ trove_venv_python_executable: "{{ openstack_venv_python_executable | default('py # for the service setup. The host must already have # clouds.yaml properly configured. trove_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}" -trove_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((trove_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}" +trove_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((trove_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}" trove_package_state: "{{ package_state | default('latest') }}" @@ -65,11 +65,11 @@ trove_profiler_enabled: false ## Cap the maximum number of threads / workers when a user value is unspecified. trove_api_workers_max: 16 -trove_api_workers: "{{ [[(ansible_processor_vcpus//ansible_processor_threads_per_core)|default(1), 1] | max * 2, trove_api_workers_max] | min }}" +trove_api_workers: "{{ [[(ansible_facts['processor_vcpus']//ansible_facts['processor_threads_per_core'])|default(1), 1] | max * 2, trove_api_workers_max] | min }}" ## Cap the maximum number of threads / workers when a user value is unspecified. trove_conductor_workers_max: 16 -trove_conductor_workers: "{{ [[(ansible_processor_vcpus//ansible_processor_threads_per_core)|default(1), 1] | max * 2, trove_conductor_workers_max] | min }}" +trove_conductor_workers: "{{ [[(ansible_facts['processor_vcpus']//ansible_facts['processor_threads_per_core'])|default(1), 1] | max * 2, trove_conductor_workers_max] | min }}" # Enable/Disable Ceilometer trove_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}" @@ -88,7 +88,7 @@ trove_git_constraints: # Database vars trove_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}" -trove_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((trove_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}" +trove_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((trove_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}" trove_galera_address: "{{ galera_address | default('127.0.0.1') }}" trove_galera_database_name: trove trove_galera_user: trove diff --git a/meta/main.yml b/meta/main.yml index b4e6516..5cccb9a 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -26,4 +26,4 @@ galaxy_info: dependencies: - role: apt_package_pinning when: - - ansible_pkg_mgr == 'apt' + - ansible_facts['pkg_mgr'] == 'apt' diff --git a/tasks/main.yml b/tasks/main.yml index 9dc4b61..84e0630 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -19,11 +19,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