Add curl to utility distro packages
This patch adds curl to the packages installed into the utility container to ensure that the task to get the list of python clients works properly. The patch also renames the package list variable name to the new convention and moves the declaration of it into group_vars so that it is overridable. Change-Id: If82485f99fe67d2c1957320c61f1231128e5ce50
This commit is contained in:
parent
350c0611cf
commit
bd6a0d8221
@ -39,6 +39,11 @@ tempest_service_available_swift: "{{ groups['swift_all'] is defined and groups['
|
||||
# Ensure that the package state matches the global setting
|
||||
utility_package_state: "{{ package_state }}"
|
||||
|
||||
# Distribution packages to be installed into the utility container
|
||||
utility_distro_packages:
|
||||
- curl
|
||||
- git
|
||||
|
||||
# Python packages to be installed into the utility container
|
||||
utility_pip_packages:
|
||||
- python-memcached
|
||||
|
@ -18,12 +18,15 @@
|
||||
max_fail_percentage: 20
|
||||
user: root
|
||||
pre_tasks:
|
||||
|
||||
- include: common-tasks/os-lxc-container-setup.yml
|
||||
|
||||
- include: common-tasks/os-log-dir-setup.yml
|
||||
vars:
|
||||
log_dirs:
|
||||
- src: "/openstack/log/{{ inventory_hostname }}-utility"
|
||||
dest: "/var/log/utility"
|
||||
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
|
||||
- name: Create log directory (not is_metal)
|
||||
@ -32,6 +35,7 @@
|
||||
state: "directory"
|
||||
force: "yes"
|
||||
when: not is_metal | bool
|
||||
|
||||
roles:
|
||||
- role: "galera_client"
|
||||
- role: "pip_install"
|
||||
@ -40,6 +44,7 @@
|
||||
- role: "openstack_openrc"
|
||||
tags:
|
||||
- openrc
|
||||
|
||||
post_tasks:
|
||||
- name: Update apt sources
|
||||
apt:
|
||||
@ -49,22 +54,22 @@
|
||||
until: apt_update|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
|
||||
- name: Install apt packages
|
||||
apt:
|
||||
pkg: "{{ item }}"
|
||||
state: latest
|
||||
with_items: "{{ utility_apt_packages | default([]) }}"
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
with_items: "{{ utility_distro_packages | default([]) }}"
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
|
||||
- name: Install yum packages
|
||||
yum:
|
||||
pkg: "{{ item }}"
|
||||
state: latest
|
||||
with_items: "{{ utility_yum_packages | default([]) }}"
|
||||
when:
|
||||
- ansible_pkg_mgr == 'yum'
|
||||
with_items: "{{ utility_distro_packages | default([]) }}"
|
||||
when: ansible_pkg_mgr == 'yum'
|
||||
|
||||
- name: Get list of python clients
|
||||
shell: "curl -s {{ openstack_repo_url }}/os-releases/{{ openstack_release }}/requirements_absolute_requirements.txt | grep client | cut -d'=' -f1"
|
||||
register: client_list
|
||||
@ -73,6 +78,7 @@
|
||||
tags:
|
||||
- always
|
||||
- skip_ansible_lint
|
||||
|
||||
- name: Install pip packages
|
||||
pip:
|
||||
name: "{{ client_list.stdout_lines | union(utility_pip_packages) | join(' ') }}"
|
||||
@ -83,6 +89,7 @@
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: "{{ utility_pip_packages }}"
|
||||
|
||||
- name: Distribute private ssh key
|
||||
copy:
|
||||
content: "{{ utility_ssh_private_key }}"
|
||||
@ -90,13 +97,8 @@
|
||||
mode: 0600
|
||||
owner: root
|
||||
group: root
|
||||
when:
|
||||
- utility_ssh_private_key is defined
|
||||
when: utility_ssh_private_key is defined
|
||||
vars:
|
||||
utility_apt_packages:
|
||||
- git
|
||||
utility_yum_packages:
|
||||
- git
|
||||
is_metal: "{{ properties.is_metal|default(false) }}"
|
||||
tags:
|
||||
- utility
|
||||
|
Loading…
Reference in New Issue
Block a user