From 2abb8a130212bdf0fc7bb453f586d069cba2aa6f Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 30 Jan 2019 15:38:58 -0800 Subject: [PATCH] Allow stage-output to copy root-owned files This makes it easier to tell stage-output to copy files such as syslog from remote nodes. Change-Id: Ica2397a50de1054f5d5ec81b54ab36fda9bdc333 --- roles/stage-output/tasks/main.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/stage-output/tasks/main.yaml b/roles/stage-output/tasks/main.yaml index 4b5924227..bee689baf 100644 --- a/roles/stage-output/tasks/main.yaml +++ b/roles/stage-output/tasks/main.yaml @@ -59,8 +59,16 @@ # remote_src copy does not work recursively, synchronise is restricted by # zuul, using command command: cp -pRL {{ item.source}} {{ stage_dir }}/{{ item.dest }} + become: true with_items: "{{ all_sources }}" +- name: Make all log files readable + file: + dest: "{{ stage_dir }}/logs" + mode: u=rwX,g=rX,o=rX + recurse: yes + become: yes + - name: Discover log files that match extension_list find: paths: "{{ stage_dir }}/logs"