Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654 Change-Id: Ic75eac3e27fd542370a04f9bd946d907f0756061
This commit is contained in:
@@ -35,7 +35,7 @@ tempest_pip_package_state: "latest"
|
|||||||
# 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.
|
||||||
tempest_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
|
tempest_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
|
||||||
tempest_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((tempest_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}"
|
tempest_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((tempest_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
||||||
|
|
||||||
# Toggle whether tempest actually executes
|
# Toggle whether tempest actually executes
|
||||||
tempest_run: no
|
tempest_run: no
|
||||||
@@ -85,7 +85,7 @@ tempest_log_dir: "/var/log/tempest"
|
|||||||
tempest_plugins: "{{ _tempest_plugins.values() | sum(start=[]) | selectattr('install', 'equalto', true) | list }}"
|
tempest_plugins: "{{ _tempest_plugins.values() | sum(start=[]) | selectattr('install', 'equalto', true) | list }}"
|
||||||
|
|
||||||
# tempest_workspace where tempest can be runned
|
# tempest_workspace where tempest can be runned
|
||||||
tempest_workspace: "{{ ansible_env.HOME }}/workspace"
|
tempest_workspace: "{{ ansible_facts['env']['HOME'] }}/workspace"
|
||||||
|
|
||||||
# The location where the test whitelist/blacklist will be placed
|
# The location where the test whitelist/blacklist will be placed
|
||||||
tempest_test_whitelist_file_path: "{{ tempest_workspace }}/etc/tempest_whitelist.txt"
|
tempest_test_whitelist_file_path: "{{ tempest_workspace }}/etc/tempest_whitelist.txt"
|
||||||
@@ -262,7 +262,7 @@ tempest_pip_packages:
|
|||||||
# name: ... name to use when uploading to glance (optional)
|
# name: ... name to use when uploading to glance (optional)
|
||||||
# properties: a dict of custom properties to attach to the image in glance (optional)
|
# properties: a dict of custom properties to attach to the image in glance (optional)
|
||||||
# <property>: <value>
|
# <property>: <value>
|
||||||
tempest_images: "{{ tempest_images_map[ansible_architecture] }}"
|
tempest_images: "{{ tempest_images_map[ansible_facts['architecture']] }}"
|
||||||
|
|
||||||
# The location where images are downloaded to
|
# The location where images are downloaded to
|
||||||
tempest_image_dir: "{{ lookup('env', 'HOME') }}/tempest-images"
|
tempest_image_dir: "{{ lookup('env', 'HOME') }}/tempest-images"
|
||||||
|
|||||||
@@ -16,12 +16,12 @@
|
|||||||
- 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 }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
- name: Gather variables for source installs
|
- name: Gather variables for source installs
|
||||||
include_vars: source_install.yml
|
include_vars: source_install.yml
|
||||||
when:
|
when:
|
||||||
- ((tempest_install_method == 'source') or (tempest_install_method == 'distro' and ansible_distribution == 'Ubuntu'))
|
- ((tempest_install_method == 'source') or (tempest_install_method == 'distro' and ansible_facts['distribution'] == 'Ubuntu'))
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,8 @@
|
|||||||
package:
|
package:
|
||||||
name: "{{ tempest_package_list }}"
|
name: "{{ tempest_package_list }}"
|
||||||
state: "{{ tempest_package_state }}"
|
state: "{{ tempest_package_state }}"
|
||||||
update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}"
|
update_cache: "{{ (ansible_facts['pkg_mgr'] in ['apt', 'zypper']) | 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
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
# in defaults as in case of non-integrated tests meta handlers from other roles might fail.
|
# in defaults as in case of non-integrated tests meta handlers from other roles might fail.
|
||||||
- name: Install Tempest packages from PIP
|
- name: Install Tempest packages from PIP
|
||||||
import_tasks: tempest_install_source.yml
|
import_tasks: tempest_install_source.yml
|
||||||
when: (tempest_install_method | default('source')) == 'source' or (tempest_install_method == 'distro' and ansible_distribution == 'Ubuntu')
|
when: (tempest_install_method | default('source')) == 'source' or (tempest_install_method == 'distro' and ansible_facts['distribution'] == 'Ubuntu')
|
||||||
|
|
||||||
- name: Install stackviz on venv
|
- name: Install stackviz on venv
|
||||||
import_role:
|
import_role:
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ live_migration = false
|
|||||||
block_migration_for_live_migration = false
|
block_migration_for_live_migration = false
|
||||||
block_migrate_cinder_iscsi = false
|
block_migrate_cinder_iscsi = false
|
||||||
spice_console = true
|
spice_console = true
|
||||||
config_drive = {{ ansible_architecture != 'aarch64' }}
|
config_drive = {{ ansible_facts['architecture'] != 'aarch64' }}
|
||||||
rescue = false
|
rescue = false
|
||||||
enable_instance_password = {{ tempest_enable_instance_password }}
|
enable_instance_password = {{ tempest_enable_instance_password }}
|
||||||
interface_attach = false
|
interface_attach = false
|
||||||
|
|||||||
Reference in New Issue
Block a user