Use shell.cmd with shell.executable

Rather than passing a string to the shell task and then using
shell.args.executable to choose an explicit executable, use
shell.cmd to set the actual script content so that shell.executable
can be used to choose the shell.

Change-Id: Ia24a21ce54746a486ba39c4eb7c32bc8470e32d4
This commit is contained in:
Jeremy Stanley
2017-10-24 00:08:59 +00:00
parent 39ddeb5144
commit 2db7071b10
2 changed files with 18 additions and 18 deletions

View File

@@ -1,7 +1,8 @@
- hosts: all
tasks:
- name: Run release scripts
shell: |
shell:
cmd: |
set -x
RELEASES_DIR=$HOME/src/{{ zuul.project.canonical_name }}
@@ -20,5 +21,4 @@
RC2=$?
exit $(($RC1 + $RC2))
args:
executable: /bin/bash

View File

@@ -11,6 +11,6 @@
become: yes
- name: Build the wheel mirror
shell: ./scripts/wheel-build.sh {{ wheel_dir }} {{ wheel_python }}
args:
shell:
cmd: ./scripts/wheel-build.sh {{ wheel_dir }} {{ wheel_python }}
executable: /bin/bash