diff --git a/defaults/main.yml b/defaults/main.yml index 9706113..bcd942d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -29,7 +29,7 @@ tacker_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups # for the service setup. The host must already have # clouds.yaml properly configured. tacker_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}" -tacker_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((tacker_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}" +tacker_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((tacker_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' @@ -92,7 +92,7 @@ tacker_optional_oslomsg_amqp1_pip_packages: ## Database info tacker_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}" -tacker_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((tacker_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}" +tacker_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((tacker_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}" tacker_galera_address: "{{ galera_address | default('127.0.0.1') }}" tacker_galera_database: tacker tacker_galera_user: tacker diff --git a/handlers/main.yml b/handlers/main.yml index efc587d..6cad2bd 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -20,6 +20,6 @@ name: "{{ tacker_service_name }}" enabled: yes state: restarted - daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}" + daemon_reload: yes listen: - "venv changed" diff --git a/meta/main.yml b/meta/main.yml index 6d6ca3b..3609d5d 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -44,4 +44,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 51ba752..764421e 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