From 8f3bc3577ec71775bcf035ec76efc8b00fd6b9e1 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Tue, 29 Oct 2019 10:09:43 +0000 Subject: [PATCH] undercloud-setup: fixed two runtime warnings Non fatal but confusing and avoidable error: /bin/sh: /etc/ci/mirror_info.sh: No such file or directory [DEPRECATION WARNING]: Invoking "pip" only once while using a loop via squash_actions is deprecated. Instead of using a loop to supply multiple items and specifying `name: "{{ item }}"`, please use `name: ['pip', 'setuptools']` and remove the loop. This feature will be removed in version 2.11. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg Change-Id: I1495dd11405613b7ca63e81cfec8c3eead2dbece --- roles/undercloud-setup/tasks/ansible_cfg.yml | 7 +++---- roles/undercloud-setup/tasks/atop.yml | 4 +++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/roles/undercloud-setup/tasks/ansible_cfg.yml b/roles/undercloud-setup/tasks/ansible_cfg.yml index 5c2676350..3f54bdc63 100644 --- a/roles/undercloud-setup/tasks/ansible_cfg.yml +++ b/roles/undercloud-setup/tasks/ansible_cfg.yml @@ -4,11 +4,10 @@ - name: Install ara deps become: true pip: - name: "{{ item }}" + name: + - pip + - setuptools state: latest - with_items: - - pip - - setuptools # TODO(sshnaidm): https://bugs.launchpad.net/tripleo/+bug/1792622 ignore_errors: true diff --git a/roles/undercloud-setup/tasks/atop.yml b/roles/undercloud-setup/tasks/atop.yml index 9269993fd..af52cddbb 100644 --- a/roles/undercloud-setup/tasks/atop.yml +++ b/roles/undercloud-setup/tasks/atop.yml @@ -6,7 +6,9 @@ # Run atop in background - name: Install atop if configured so shell: | - source /etc/ci/mirror_info.sh + if [ -e /etc/ci/mirror_info.sh ]; then + source /etc/ci/mirror_info.sh + fi atop_location=$(repoquery --repoid=osepel --repofrompath=osepel,$NODEPOOL_EPEL_MIRROR/7/x86_64/ --location atop) {{ ansible_pkg_mgr }} install -y $atop_location