Merge "install-ansible: remove stub install for ARA"

This commit is contained in:
Zuul 2022-10-10 23:46:52 +00:00 committed by Gerrit Code Review
commit 04cfaddece
2 changed files with 7 additions and 39 deletions

View File

@ -1,22 +0,0 @@
- name: Create build dir
tempfile:
state: directory
suffix: fake-ansible
register: _build_dir
- name: Install fake setup.py
blockinfile:
create: yes
path: '{{ _build_dir.path }}/setup.py'
block: |
import setuptools
setuptools.setup(name="ansible",
url="http://fake.com",
maintainer="nobody@nobody.com",
version="2.9.0",
description="Fake ansible")
- name: Install stub ansible
pip:
name: '{{ _build_dir.path }}'

View File

@ -20,28 +20,18 @@
_install_ansible_state: latest
when: install_ansible_version == 'latest'
# Since Ansible 2.10 (~2020-08) the devel core package is split into
# "ansible-base". The PyPi the package "ansible" has everything in it
# (the so called Ansible Community Distribution) but we specifically
# want to test against devel. However, ARA still depends on the
# "ansible" package -- but we like ARA, because we can see the nested
# runs with it. To to keep ARA but avoid it bringing in either an old
# version of Ansible, or the ACD, install a dummy package.
# From Ansible 2.10 >= most of the fun stuff is in collections. Clone
# our required collections here. Note this is only for our testing of
# the devel branch; if we're using a release we use the Ansible
# distribution package which bundles all this.
#
# TODO(ianw): we should add these to zuul and link the speculative
# copies into ansible, then we could test changes in the collections!
- name: Check if running devel branch
set_fact:
_install_ansible_from_devel: true
when: '"github.com/ansible/ansible" in install_ansible_name'
- name: Setup Ansible stub for post 2.10 compat
include_tasks: install_ansible_stub.yaml
when: _install_ansible_from_devel is defined
# From Ansible 2.10 >= most of the fun stuff is in collections. Clone
# our required collections here. Note, in production, we use ACD
# which bundles most of this.
#
# TODO(ianw): we should add these to zuul and link the speculative
# copies into ansible, then we could test changes in the collections!
- name: Install Ansible collections
include_tasks: install_ansible_collection.yaml
when: _install_ansible_from_devel is defined