Merge "Don't use copy module for /etc/yum.repos.d"

This commit is contained in:
Zuul 2018-09-15 14:35:31 +00:00 committed by Gerrit Code Review
commit 666d00986b
2 changed files with 3 additions and 8 deletions

View File

@ -14,18 +14,13 @@
set_fact:
modify_dir_path: "{{ context_dir.path }}"
- name: Copy directory used for /etc/yum.repos.d
copy:
src: "{{ yum_repos_dir_path }}"
dest: "{{ modify_dir_path }}/yum.repos.d"
when: yum_repos_dir_path is defined
- name: Copy local file repos to context directory
shell: |
#!/bin/sh
set -ex
cp -a {{ yum_repos_dir_path }} {{ modify_dir_path }}/yum.repos.d
# discover repos with local packages
repos=$(sed -n 's/baseurl=file:\/\///p' {{ yum_repos_dir_path }}/*.repo)

View File

@ -8,7 +8,7 @@ COPY compare-package-json.py /tmp/
{% if yum_repos_dir_path is defined %}
RUN rm -rf /etc/yum.repos.d/
COPY yum.repos.d /etc/
COPY yum.repos.d /etc/yum.repos.d
COPY repos /
{% endif %}