
Currently a few packages are installed without it, pulling in undesired updates (e.g. cryptography 2.8 on stable/steain). This change fixes it. The --upgrade and --force-reinstall flags are removed from all pip calls since they're not compatible with using upper-constraints. The explicit installation of pyOpenSSL is removed, >= 18.0 is anyway used by Rocky and newer. A few explicit usages of -c argument are also removed in favour of the implicit handling in pip_install.yml. Change-Id: Ic776cb2ec0779c9b324e94bf387ee4f3f857cd72
145 lines
4.7 KiB
YAML
145 lines
4.7 KiB
YAML
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
# implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
---
|
|
- import_role:
|
|
name: venv_python_path
|
|
|
|
- name: "Update Package Cache"
|
|
apt: update_cache=yes
|
|
when: ansible_os_family == 'Debian'
|
|
|
|
- name: "Install packages"
|
|
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
|
|
with_items: "{{ required_packages }}"
|
|
|
|
- name: "If running in CI, set source install facts just to be sure"
|
|
set_fact:
|
|
shade_source_install: true
|
|
ironicclient_source_install: true
|
|
when: ci_testing | bool == true
|
|
|
|
# NOTE(TheJulia) While we don't necessarilly require /opt/stack any longer
|
|
# and it should already be created by the Ansible setup, we will leave this
|
|
# here for the time being.
|
|
- name: "Ensure /opt/stack is present"
|
|
file: name=/opt/stack state=directory owner=root group=root
|
|
|
|
- name: "OpenStack Client - Install"
|
|
include: pip_install.yml
|
|
package=python-openstackclient
|
|
when: skip_install is not defined
|
|
|
|
- name: "proliantutils - Install from pip"
|
|
include: pip_install.yml
|
|
package=proliantutils
|
|
state=present
|
|
environment: "{{ venv }}"
|
|
when: skip_install is not defined
|
|
|
|
- name: "Install iSCSI client and dependencies if iscsi deploy interface is enabled"
|
|
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
|
|
with_items: "{{ iscsi_required_packages }}"
|
|
when: skip_install is not defined and 'iscsi' in enabled_deploy_interfaces
|
|
|
|
- name: "Diskimage-builder - Install"
|
|
include: pip_install.yml
|
|
package=diskimage-builder
|
|
sourcedir={{ dib_git_folder }}
|
|
source_install=true
|
|
when: skip_install is not defined and install_dib | bool == true
|
|
|
|
- name: "IPA-builder - Install"
|
|
include: pip_install.yml
|
|
package=ironic-python-agent-builder
|
|
sourcedir={{ ipa_builder_git_folder }}
|
|
source_install=true
|
|
when: skip_install is not defined and install_dib | bool == true
|
|
|
|
- name: "sushy - Install"
|
|
include: pip_install.yml
|
|
package=sushy
|
|
sourcedir={{ sushy_git_folder }}
|
|
source_install={{ sushy_source_install }}
|
|
when: skip_install is not defined
|
|
|
|
- name: "Ironic Client - Install"
|
|
include: pip_install.yml
|
|
package=python-ironicclient
|
|
state=latest
|
|
sourcedir={{ ironicclient_git_folder }}
|
|
source_install={{ ironicclient_source_install }}
|
|
when: skip_install is not defined
|
|
|
|
- name: "Install configparser in venv if using"
|
|
include: pip_install.yml
|
|
package=configparser
|
|
virtualenv={{ bifrost_venv_dir }}
|
|
when: skip_install is not defined and (enable_venv | bool == true)
|
|
|
|
- name: "Install pymysql in venv if using"
|
|
include: pip_install.yml
|
|
package=pymysql
|
|
state=latest
|
|
virtualenv={{ bifrost_venv_dir }}
|
|
when:
|
|
- skip_install is not defined
|
|
- enable_venv | bool == true
|
|
|
|
- name: "Install pymysql for non-venv environments to support Ansible"
|
|
include: pip_install.yml
|
|
package=pymysql
|
|
when:
|
|
- skip_install is not defined
|
|
- enable_venv | bool == false
|
|
|
|
- name: "Install extra packages for ironic"
|
|
include: pip_install.yml
|
|
package={{ item }}
|
|
with_items: "{{ ironic_extra_packages }}"
|
|
|
|
- name: "Install Ironic using pip"
|
|
include: pip_install.yml
|
|
package=ironic
|
|
state=latest
|
|
sourcedir={{ ironic_git_folder }}
|
|
source_install=true
|
|
extra_args="--no-cache-dir {{ pip_opts }}"
|
|
when: skip_install is not defined
|
|
|
|
- name: "Install ironic-inspector to permit use of inspection interface"
|
|
include: inspector_install.yml
|
|
when: skip_install is not defined and enable_inspector | bool == true
|
|
|
|
- name: "Install ironic-staging-drivers"
|
|
include: staging_install.yml
|
|
when: skip_install is not defined and staging_drivers_include | bool == true
|
|
|
|
# NOTE(pas-ha) even when install into virtualenv is requested,
|
|
# we need to install shade into system for enroll-dynamic to succeed
|
|
- block:
|
|
- name: install shade
|
|
include: pip_install.yml
|
|
package=shade
|
|
sourcedir={{ shade_git_folder }}
|
|
source_install={{ shade_source_install }}
|
|
# NOTE(TheJulia): Install openstacksdk since shade wraps to openstacksdk and
|
|
# the logic is largely going into openstacksdk as time goes on.
|
|
- name: install openstacksdk
|
|
include: pip_install.yml
|
|
package=openstacksdk
|
|
sourcedir={{ openstacksdk_git_folder }}
|
|
source_install={{ openstacksdk_source_install }}
|
|
when: skip_install is not defined
|