Remove gratuitous use of xargs
Find can do the thing we want it to do without involving xargs. The -exec {} + construct will put all the found files into one long set of arguments (up to the limit, at which point additional commands will be constructed). Failures of exec will result in nonzero return of find. Change-Id: I4427a259df29c3f31581c7452cd0cf5e1bc78416 Signed-off-by: Jesse Keating <omgjlk@us.ibm.com>
This commit is contained in:
parent
6e7b44ea84
commit
a85b54e08d
8
tox.ini
8
tox.ini
@ -30,11 +30,11 @@ commands =
|
||||
# Ansible Lint Check
|
||||
# NOTE(pabelanger): Ignore the following checks:
|
||||
# ANSIBlE0012: Commands should not change things if nothing needs doing
|
||||
bash -c "cd playbooks; find . -type f -regex '.*.y[a]?ml' -not -path './legacy/*' -print0 | xargs -t -0 \
|
||||
ansible-lint -x ANSIBLE0012"
|
||||
bash -c "cd playbooks; find . -type f -regex '.*.y[a]?ml' -not -path './legacy/*' -exec \
|
||||
ansible-lint -x ANSIBLE0012 \{\} +"
|
||||
# Ansible Syntax Check
|
||||
bash -c "cd playbooks; find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -0 \
|
||||
ansible-playbook --syntax-check -i {toxinidir}/tests/inventory > /dev/null"
|
||||
bash -c "cd playbooks; find . -type f -regex '.*.y[a]?ml' -exec \
|
||||
ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \{\} + > /dev/null"
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
Loading…
x
Reference in New Issue
Block a user