yum_update: cp the script in /tmp before buildah cp
In I8a3769c0b55572ba05cc29ecd28a131cc94e8c4d, we switched the playbook to use buildah CLI and run the yum_update.sh from a directory that wasn't found by the playbook: no files found matching "files/yum_update.sh": no such file or directory This patch first copies the script in /tmp, so it can be copied from the host afterward. Change-Id: I6da0850386c0e3ca51f5f42dbd97c26bf5364a24
This commit is contained in:
parent
0bdc068df3
commit
f77b9a22e9
|
@ -16,11 +16,27 @@
|
|||
--label modified_append_tag={{ modified_append_tag }}
|
||||
--workingdir / {{ from_image }}
|
||||
|
||||
- name: Create tempfile name for yum_update.sh
|
||||
tempfile:
|
||||
state: file
|
||||
register: yum_update
|
||||
|
||||
- name: Prepare yum_update.sh script
|
||||
copy:
|
||||
src: files/yum_update.sh
|
||||
dest: "{{ yum_update.path }}"
|
||||
mode: 0755
|
||||
|
||||
- name: Copy yum_update.sh
|
||||
command: >
|
||||
buildah copy
|
||||
{{ from_image }}
|
||||
files/yum_update.sh /tmp/yum_update.sh
|
||||
{{ yum_update.path }} /tmp/yum_update.sh
|
||||
|
||||
- name: Remove temporary yum_update.sh script
|
||||
file:
|
||||
path: "{{ yum_update.path }}"
|
||||
state: absent
|
||||
|
||||
- name: List file repos
|
||||
shell: sed -n 's|baseurl=file://||p' *.repo
|
||||
|
|
Loading…
Reference in New Issue