From 36d95a112da30d60847108946b433c376b4e77cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guilherme=20Steinm=C3=BCller?= Date: Fri, 15 Feb 2019 19:03:21 +0000 Subject: [PATCH] Iterate over list of values of PPC packages dict Currently as we are iterating over a higher level dictionary and it is not possible to access the item.value.url attribute directly. Alternatively, we could get the values that is a list and then iterate over that list to get properly the url and checksum variables. Also, we are not iterating over the dictionary we alternatively change the item.key to galera_server_percona_distro_packages_alt_arch.keys()[0] that produces the result as item.key. Change-Id: I3e102377630d9c8ea5c9e3ea03cae3975a05dbb8 Closes-Bug: #1815902 --- tasks/galera_install_download_extra_packages.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tasks/galera_install_download_extra_packages.yml b/tasks/galera_install_download_extra_packages.yml index c9157d27..bc9d8557 100644 --- a/tasks/galera_install_download_extra_packages.yml +++ b/tasks/galera_install_download_extra_packages.yml @@ -22,12 +22,12 @@ - name: Download extra packages get_url: - url: "{{ item.value.url }}" - dest: "{{ galera_server_extra_package_path }}/{{ item.key }}/" - checksum: "{{ item.value.checksum | default(omit) }}" - force: "{{ item.value.checksum is not defined }}" + url: "{{ item.url }}" + dest: "{{ galera_server_extra_package_path }}/{{ galera_server_percona_distro_packages_alt_arch.keys()[0] }}/" + checksum: "{{ item.checksum | default(omit) }}" + force: "{{ item.checksum is not defined }}" validate_certs: "{{ galera_server_extra_package_validate_certs }}" - with_dict: "{{ galera_server_percona_distro_packages_alt_arch }}" + with_items: "{{ galera_server_percona_distro_packages_alt_arch.values() | flatten | list }}" register: fetch_url until: fetch_url is success retries: 3