Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654 Change-Id: I8e38b479c257e077c2f6cb982acf79f02f0e43a9
This commit is contained in:
parent
f2093a18ed
commit
dcc4572be5
@ -118,7 +118,6 @@ venv_wheel_build_enable: "{{ venv_build_host != inventory_hostname }}"
|
||||
# subsequent venv builds on this host and others. When
|
||||
# this is the same as the target host, then we will not
|
||||
# bother building wheels.
|
||||
|
||||
venv_build_host: "{{ venv_build_targets[ansible_facts['distribution_version']][ansible_facts['architecture']] }}"
|
||||
|
||||
# The path for the wheel build venv.
|
||||
|
@ -31,7 +31,7 @@
|
||||
package:
|
||||
name: "{{ (venv_wheel_build_enable | bool) | ternary(venv_install_distro_package_list, (venv_build_base_distro_package_list | union(venv_build_distro_package_list) | union(venv_install_distro_package_list))) }}"
|
||||
state: "{{ venv_distro_package_state }}"
|
||||
update_cache: "{{ (ansible_facts['pkg_mgr'] in ['apt', 'zypper']) | ternary('yes', omit) }}"
|
||||
update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"
|
||||
cache_valid_time: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary(venv_distro_cache_valid_time, omit) }}"
|
||||
when:
|
||||
- (venv_build_distro_package_list | length > 0) or
|
||||
@ -54,7 +54,7 @@
|
||||
state: directory
|
||||
|
||||
# NOTE(odyssey4me):
|
||||
# Not using --always-copy for CentOS/SuSE due to
|
||||
# Not using --always-copy for CentOS due to
|
||||
# https://github.com/pypa/virtualenv/issues/565
|
||||
- name: Create the virtualenv (if it does not exist)
|
||||
command: >-
|
||||
|
@ -21,7 +21,7 @@
|
||||
package:
|
||||
name: "{{ venv_build_base_distro_package_list | union(venv_build_distro_package_list) }}"
|
||||
state: "{{ venv_distro_package_state }}"
|
||||
update_cache: "{{ (ansible_facts['pkg_mgr'] in ['apt', 'zypper']) | ternary('yes', omit) }}"
|
||||
update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"
|
||||
cache_valid_time: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary(venv_distro_cache_valid_time, omit) }}"
|
||||
when:
|
||||
- (venv_build_distro_package_list | length > 0) or
|
||||
@ -54,7 +54,7 @@
|
||||
state: directory
|
||||
|
||||
# NOTE(odyssey4me):
|
||||
# Not using --always-copy for CentOS/SuSE due to
|
||||
# Not using --always-copy for CentOS due to
|
||||
# https://github.com/pypa/virtualenv/issues/565
|
||||
- name: Create the wheel build virtualenv (if it does not exist)
|
||||
command: >-
|
||||
|
@ -19,20 +19,12 @@ _venv_build_base_distro_package_list:
|
||||
- g++
|
||||
- "{{ (venv_python_executable == 'python2') | ternary('pkg-config', 'python3-pkgconfig') }}"
|
||||
- "{{ (venv_python_executable == 'python2') | ternary('python-dev', 'python3-dev') }}"
|
||||
gentoo:
|
||||
- dev-util/cmake
|
||||
redhat:
|
||||
- autoconf
|
||||
- cmake
|
||||
- gcc
|
||||
- gcc-c++
|
||||
- "{{ (venv_python_executable == 'python2') | ternary('python2-devel', 'python3-devel') }}"
|
||||
suse:
|
||||
- autoconf
|
||||
- cmake
|
||||
- gcc
|
||||
- gcc-c++
|
||||
- "{{ (venv_python_executable == 'python2') | ternary('python-devel', 'python3-devel') }}"
|
||||
|
||||
# Set the available build targets for all nodes within an environment.
|
||||
# build targets are grouped based on operating system and CPU
|
||||
@ -41,8 +33,8 @@ _venv_build_base_distro_package_list:
|
||||
# This is the data structure used to determine the build host.
|
||||
# venv_build_targets:
|
||||
# {
|
||||
# ansible_distribution_version: {
|
||||
# ansible_architecture: inventory_hostname
|
||||
# ansible_facts['distribution_version']: {
|
||||
# ansible_facts['architecture']: inventory_hostname
|
||||
# }
|
||||
# }
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user