summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmilien Macchi <emilien@redhat.com>2019-01-21 09:22:55 -0500
committerEmilien Macchi <emilien@redhat.com>2019-01-23 01:19:38 +0000
commitf77b9a22e9b5e46e238b5688ce192014607b1549 (patch)
treec4fcaa8a98a544573923f2244137c64ba8afcc51
parent0bdc068df326cc90508bfc4855af9dec193c06d7 (diff)
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
Notes
Notes (review): Code-Review+2: Alex Schultz <aschultz@redhat.com> Code-Review+2: Steve Baker <sbaker@redhat.com> Workflow+1: Steve Baker <sbaker@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 23 Jan 2019 06:18:58 +0000 Reviewed-on: https://review.openstack.org/632099 Project: openstack/ansible-role-tripleo-modify-image Branch: refs/heads/master
-rw-r--r--tasks/yum_update_buildah.yml18
1 files changed, 17 insertions, 1 deletions
diff --git a/tasks/yum_update_buildah.yml b/tasks/yum_update_buildah.yml
index 36f6350..88452ca 100644
--- a/tasks/yum_update_buildah.yml
+++ b/tasks/yum_update_buildah.yml
@@ -16,11 +16,27 @@
16 --label modified_append_tag={{ modified_append_tag }} 16 --label modified_append_tag={{ modified_append_tag }}
17 --workingdir / {{ from_image }} 17 --workingdir / {{ from_image }}
18 18
19- name: Create tempfile name for yum_update.sh
20 tempfile:
21 state: file
22 register: yum_update
23
24- name: Prepare yum_update.sh script
25 copy:
26 src: files/yum_update.sh
27 dest: "{{ yum_update.path }}"
28 mode: 0755
29
19- name: Copy yum_update.sh 30- name: Copy yum_update.sh
20 command: > 31 command: >
21 buildah copy 32 buildah copy
22 {{ from_image }} 33 {{ from_image }}
23 files/yum_update.sh /tmp/yum_update.sh 34 {{ yum_update.path }} /tmp/yum_update.sh
35
36- name: Remove temporary yum_update.sh script
37 file:
38 path: "{{ yum_update.path }}"
39 state: absent
24 40
25- name: List file repos 41- name: List file repos
26 shell: sed -n 's|baseurl=file://||p' *.repo 42 shell: sed -n 's|baseurl=file://||p' *.repo