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: Id3e23e67727d8ac7f29c87d6865b54dc729ccaf4
This commit is contained in:
Monty Taylor 2018-06-18 12:20:34 -05:00
parent 8ec65033aa
commit 4997f9bee0
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594

View File

@ -14,13 +14,14 @@
recurse: yes recurse: yes
mode: 0775 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 - name: Ensure logs are readable before uploading
delegate_to: localhost delegate_to: localhost
file: command: "chmod -R u=rwX,g=rX,o=rX {{ zuul.executor.log_root }}/"
path: "{{ zuul.executor.log_root }}/" # ANSIBLE0007 chmod used in place of argument mode to file
mode: u=rwX,g=rX,o=rX tags:
state: directory - skip_ansible_lint
recurse: yes
- name: Upload logs to log server - name: Upload logs to log server
synchronize: synchronize: