修改'dict object' has no attribute 'downpath'错误

This commit is contained in:
root
2020-07-07 08:24:28 +08:00
parent ad148140fa
commit 988ea5c6b3
2 changed files with 3 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ rpmdict:
selftest:
fullname: "self-test-ci_test_rpm-1.el7.x86_64.rpm"
name: "self-test"
downpath: " /tmp/padding_for_PACK_TAR_BUILD_DIRS_PREFIX/tsg/tsg-scripts/roles/self-test/files/rpms"
downpath: "/tmp/padding_for_PACK_TAR_BUILD_DIRS_PREFIX/tsg/tsg-scripts/roles/self-test/files/rpms"
dockerImages:
- name: "git.mesalab.cn:7443/tsg/tsg-diagnose/unittest"

View File

@@ -1,8 +1,8 @@
---
- name: "download rpm package by rpm list"
yum:
name: "{{ item.name }}"
name: "{{ item.value.name }}"
state: present
download_only: true
download_dir: "{{ item.downpath }}"
download_dir: "{{ item.value.downpath }}"
with_dict: "{{ rpmdict }}"