Emit shell instead of script tasks

Unmatched single quotes is what killed us before. Add an option which
does a test with ansible-playbook --syntax-check to validate whether a
playbook emitted with shell instead of script works.

Running that way takes around 90 minutes. So default to shell, but
provide --syntax-check as a way to check using shell and fallback to
script. This can then be used to fix pre-migration jobs if desired.

Also separate task entries with an extra '\n' for readability.

And only collect the generated playbooks - not all of them.

Change-Id: I147a7562e6578ab300ef56ae7b1c9d9d3f8f920f
This commit is contained in:
Monty Taylor
2017-09-18 11:22:51 -05:00
parent 661433409f
commit feec38afe6
2 changed files with 140 additions and 27 deletions

View File

@@ -19,8 +19,8 @@
- name: Collect generated playbooks
synchronize:
dest: "{{ zuul.executor.log_root }}"
dest: "{{ zuul.executor.log_root }}/playbooks"
mode: pull
src: "src/git.openstack.org/openstack-infra/project-config/playbooks"
src: "src/git.openstack.org/openstack-infra/project-config/playbooks/legacy"
verify_host: true
no_log: true