From e1be7a5268e88f82efacc6687f720f696c75221d Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Tue, 3 Sep 2019 10:00:14 -0400 Subject: [PATCH] ceph-volume tests pre-instrall python-apt to prevent auto-install failing later Signed-off-by: Alfredo Deza (cherry picked from commit 40cac7b9510f7904c2f9dfb1294d809e04bdcf7e) --- .../tests/functional/playbooks/deploy.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/ceph-volume/ceph_volume/tests/functional/playbooks/deploy.yml b/src/ceph-volume/ceph_volume/tests/functional/playbooks/deploy.yml index a6aea8b51228e..6c2c50bbadccd 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/playbooks/deploy.yml +++ b/src/ceph-volume/ceph_volume/tests/functional/playbooks/deploy.yml @@ -16,6 +16,9 @@ vars: delegate_facts_host: True + environment: + DEBIAN_FRONTEND: noninteractive + pre_tasks: # If we can't get python2 installed before any module is used we will fail # so just try what we can to get it installed @@ -31,6 +34,17 @@ when: - systempython2.stat is undefined or systempython2.stat.exists == false + # Ansible will try to auto-install python-apt, in some systems this might be + # python3-apt, or python-apt, and it has caused whole runs to fail because + # it is trying to do an interactive prompt + - name: install python-apt and aptitude in debian based systems + raw: sudo apt-get -y install "{{ item }}" + ignore_errors: yes + with_items: + - python3-apt + - python-apt + - aptitude + - name: install python2 for fedora raw: sudo dnf -y install python creates=/usr/bin/python ignore_errors: yes -- 2.39.5