From 12260175745d50defa4c260d248eff68d99e1bbc Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Tue, 9 Aug 2022 11:24:03 +1000 Subject: [PATCH] install-ansible: remove stub install for ARA The current version of ARA doesn't depend on the "ansible" package any more, so we don't need this fake stub package installed to fool it. Remove this workaround. Change-Id: I9330a22650204464b0b677fca06deec494731641 --- .../tasks/install_ansible_stub.yaml | 22 ----------------- .../roles/install-ansible/tasks/main.yaml | 24 ++++++------------- 2 files changed, 7 insertions(+), 39 deletions(-) delete mode 100644 playbooks/roles/install-ansible/tasks/install_ansible_stub.yaml diff --git a/playbooks/roles/install-ansible/tasks/install_ansible_stub.yaml b/playbooks/roles/install-ansible/tasks/install_ansible_stub.yaml deleted file mode 100644 index 18723ff199..0000000000 --- a/playbooks/roles/install-ansible/tasks/install_ansible_stub.yaml +++ /dev/null @@ -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 }}' diff --git a/playbooks/roles/install-ansible/tasks/main.yaml b/playbooks/roles/install-ansible/tasks/main.yaml index 31119d5f74..6ba50a3868 100644 --- a/playbooks/roles/install-ansible/tasks/main.yaml +++ b/playbooks/roles/install-ansible/tasks/main.yaml @@ -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