mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
switch from head to tail
from @relrod `head` will close the input fd when it no longer needs it (or exits). find will try to write to the closed fd and somewhere along the way, it will receive SIGPIPE as a result. This is why `yes | head -5 ` doesn't run forever.
This commit is contained in:
parent
283adc30a8
commit
89e41597a6
@ -26,7 +26,7 @@
|
||||
name: Update source tree if necessary
|
||||
tasks:
|
||||
- name: Delete project directory before update
|
||||
ansible.builtin.shell: set -o pipefail && find . -delete -print | head -2 # volume mounted, cannot delete folder itself
|
||||
ansible.builtin.shell: set -o pipefail && find . -delete -print | tail -2 # volume mounted, cannot delete folder itself
|
||||
register: reg
|
||||
changed_when: reg.stdout_lines | length > 1
|
||||
args:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user