DNM, debug for container-modify

Change-Id: Ie3132176b2cebc4c1f173b2cdd3e736d503bba5e
This commit is contained in:
Wesley Hayutin 2021-05-19 11:39:11 -06:00
parent 2c53d70612
commit 5a26a2399a
2 changed files with 20 additions and 4 deletions

View File

@ -6,9 +6,10 @@
- import_tasks: get_original_user.yml
- name: Create image build context directory
tempfile:
file:
state: directory
prefix: tripleo-modify-image
path: /home/zuul/tripleo-modify-image
mode: 0755
register: context_dir
- name: Set modify_dir_path

View File

@ -116,7 +116,7 @@
--user root
--net host
{{ from_image }}
/tmp/yum_update.sh "{{ update_repo }}"
/tmp/yum_update.sh "{{ update_repo }}" &> /tmp/yum_update.log
register: result
rescue:
@ -135,12 +135,27 @@
--user root
--net host
{{ from_image }}
bash -x /tmp/yum_update.sh "{{ update_repo }}"
bash -x /tmp/yum_update.sh "{{ update_repo }}" &> /tmp/yum_update.log
retries: 2
delay: 3
register: result
until: result.rc == 0
- name: deliniate log with container name
command: >
echo "** {{ from_image }} **" >> /var/log/container_yum_update.log
- name: log container yum transaction
command: >
buildah --debug run
--user root
--net host
{{ from_image }}
cat /tmp/yum_update.log &>> /var/log/container_yum_update.log
retries: 2
delay: 3
ignore_errors: true
- name: Remove temporary yum_update.sh script
file:
path: "{{ yum_update.path }}"