tasks: Use PIP distribution packages for openSUSE and Ubuntu
Supported openSUSE and Ubuntu distributions ship with relatively new pip, setuptools, virtualenv and wheel packages so we can use that in favor of the PIP ones. This also avoids running the pip_install role on these hosts making the deployment somewhat faster. Implements: blueprint openstack-distribution-packages Change-Id: I424ca9ca71253cc4e673065f35c9b939942eeda3
This commit is contained in:
parent
eced28f9a9
commit
899e838419
@ -131,6 +131,9 @@ 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.
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Supported openSUSE and Ubuntu hosts ship with new enough pip,
|
||||
setuptools, virtualenv and wheel packages which are now being
|
||||
used in favor of the PIP ones.
|
@ -72,9 +72,20 @@
|
||||
- name: Run the pip install role
|
||||
include_role:
|
||||
name: pip_install
|
||||
when: not openstack_host_use_distro_pip
|
||||
tags:
|
||||
- openstack_hosts-install
|
||||
|
||||
- name: Install PIP distribution packages
|
||||
package:
|
||||
name: "{{ openstack_host_pip_packages }}"
|
||||
state: "{{ openstack_hosts_package_state }}"
|
||||
when: openstack_host_use_distro_pip
|
||||
register: install_packages
|
||||
until: install_packages | success
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- include_tasks: openstack_authorized_keys.yml
|
||||
tags:
|
||||
- openstack_hosts-config
|
||||
|
@ -22,6 +22,8 @@ openstack_host_module_file: /etc/modules-load.d/openstack-ansible.conf
|
||||
|
||||
openstack_host_sysstat_cron_mode: '0600'
|
||||
|
||||
openstack_host_use_distro_pip: false
|
||||
|
||||
## Kernel modules loaded on hosts
|
||||
openstack_host_kernel_modules:
|
||||
- name: 8021q
|
||||
|
@ -27,6 +27,13 @@ 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
|
||||
|
@ -16,6 +16,17 @@
|
||||
## 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user