Just use chmod instead of file for log permissions

The file module with recurse goes to the bad place when the content has
a symlink to '.'. Rather than fighting it - just use chmod -R, which
does what we want.

Change-Id: Ied4cc2a7e252db555ffdc3f1fd47edaf93b666da
This commit is contained in:
Monty Taylor 2018-06-16 09:19:34 -05:00
parent 0d8463bea7
commit d45f691599
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
1 changed files with 6 additions and 6 deletions

View File

@ -14,14 +14,14 @@
recurse: yes
mode: 0775
# Use chmod instead of file because ansible 2.5 file with recurse and
# follow can't really handle symlinks to .
- name: Ensure logs are readable before uploading
delegate_to: localhost
file:
path: "{{ zuul.executor.log_root }}/"
mode: u=rwX,g=rX,o=rX
state: directory
follow: false
recurse: yes
command: "chmod -R u=rwX,g=rX,o=rX {{ zuul.executor.log_root }}/"
# ANSIBLE0007 chmod used in place of argument mode to file
tags:
- skip_ansible_lint
- name: Upload logs to log server
synchronize: