Adjust how pip distro packages are implemented
Unfortunately the change in [1] broke the integrated build. The py_pkgs lookup is incapable of interpreting jinja. It also assumes that any variable named _pip_packages has python packages in it, and processes them. This renames the variable so that it conforms with other distro package lists using _distro_packages instead. It also adjusts the way the packages are installed a little so that the var name is overridable, and the variables are nearer their physical host siblings. [1] https://review.openstack.org/563684 Change-Id: I2acdab13ba2afe18656cdc66037af6b731058836
This commit is contained in:
parent
899e838419
commit
d99cf0f0b1
|
@ -119,6 +119,9 @@ openstack_kernel_options:
|
|||
# above.
|
||||
openstack_user_kernel_options: []
|
||||
|
||||
# Overridable set of packages to install on all hosts and containers.
|
||||
openstack_host_distro_packages: "{{ _openstack_host_distro_packages }}"
|
||||
|
||||
# Overridable set of packages to install on the host.
|
||||
openstack_host_metal_distro_packages: "{{ _openstack_host_metal_distro_packages }}"
|
||||
|
||||
|
@ -131,9 +134,6 @@ global_environment_variables: {}
|
|||
# Set the default mode for the /etc/cron.d/sysstat file
|
||||
openstack_host_sysstat_cron_mode: '0755'
|
||||
|
||||
# Distribution packages required for using pip on the host
|
||||
openstack_host_pip_packages: "{{ _openstack_host_pip_packages | default([]) }}"
|
||||
|
||||
## Default repositories data
|
||||
# Set default mirror for CentOS repositories
|
||||
# NOTE(mhayden): Ensure that the full path to the 'centos' directory is used.
|
||||
|
|
|
@ -72,15 +72,16 @@
|
|||
- name: Run the pip install role
|
||||
include_role:
|
||||
name: pip_install
|
||||
when: not openstack_host_use_distro_pip
|
||||
when:
|
||||
- ansible_pkg_mgr in ['yum', 'dnf']
|
||||
tags:
|
||||
- openstack_hosts-install
|
||||
|
||||
- name: Install PIP distribution packages
|
||||
- name: Install distro packages
|
||||
package:
|
||||
name: "{{ openstack_host_pip_packages }}"
|
||||
name: "{{ openstack_host_distro_packages }}"
|
||||
state: "{{ openstack_hosts_package_state }}"
|
||||
when: openstack_host_use_distro_pip
|
||||
when: "{{ openstack_host_distro_packages | length > 0 }}"
|
||||
register: install_packages
|
||||
until: install_packages | success
|
||||
retries: 5
|
||||
|
|
|
@ -48,6 +48,9 @@ openstack_host_kernel_modules:
|
|||
- name: nf_nat_ipv4
|
||||
- name: vhost_net
|
||||
|
||||
## Base packages
|
||||
_openstack_host_distro_packages: []
|
||||
|
||||
## Bare metal base packages
|
||||
_openstack_host_metal_distro_packages:
|
||||
- bridge-utils
|
||||
|
|
|
@ -27,13 +27,6 @@ openstack_host_module_file: /etc/modules-load.d/openstack-ansible.conf
|
|||
|
||||
openstack_host_sysstat_cron_mode: '0644'
|
||||
|
||||
openstack_host_use_distro_pip: true
|
||||
_openstack_host_pip_packages:
|
||||
- python-pip
|
||||
- python-setuptools
|
||||
- python-virtualenv
|
||||
- python-wheel
|
||||
|
||||
## Kernel modules loaded on hosts
|
||||
openstack_host_kernel_modules:
|
||||
- name: 8021q
|
||||
|
@ -63,6 +56,13 @@ openstack_host_kernel_modules:
|
|||
- name: x_tables
|
||||
|
||||
## Base packages
|
||||
_openstack_host_distro_packages:
|
||||
- python-pip
|
||||
- python-setuptools
|
||||
- python-virtualenv
|
||||
- python-wheel
|
||||
|
||||
## Bare metal base packages
|
||||
_openstack_host_metal_distro_packages:
|
||||
- bridge-utils
|
||||
- patterns-openSUSE-devel_basis
|
||||
|
|
|
@ -16,17 +16,6 @@
|
|||
## APT Cache Options
|
||||
cache_timeout: 600
|
||||
|
||||
openstack_host_use_distro_pip: true
|
||||
_openstack_host_pip_packages:
|
||||
- python-pip
|
||||
- python3-pip
|
||||
- python-setuptools
|
||||
- python3-setuptools
|
||||
- python-virtualenv
|
||||
- python3-virtualenv
|
||||
- python-wheel
|
||||
- python3-wheel
|
||||
|
||||
## Defined required kernel
|
||||
openstack_host_required_kernel: 4.4.0-0-generic
|
||||
openstack_host_sysstat_file: /etc/default/sysstat
|
||||
|
@ -61,6 +50,17 @@ openstack_host_kernel_modules:
|
|||
- name: x_tables
|
||||
|
||||
## Base packages
|
||||
_openstack_host_distro_packages:
|
||||
- python-pip
|
||||
- python3-pip
|
||||
- python-setuptools
|
||||
- python3-setuptools
|
||||
- python-virtualenv
|
||||
- python3-virtualenv
|
||||
- python-wheel
|
||||
- python3-wheel
|
||||
|
||||
## Bare metal base packages
|
||||
_openstack_host_metal_distro_packages:
|
||||
- apparmor-utils
|
||||
- apt-transport-https
|
||||
|
|
Loading…
Reference in New Issue