Merge "Use include_role and delegate_to for upload-npm"

This commit is contained in:
Zuul 2019-03-14 19:01:47 +00:00 committed by Gerrit Code Review
commit ce7223c9eb
1 changed files with 7 additions and 5 deletions

View File

@ -1,14 +1,16 @@
- hosts: ubuntu-xenial
- hosts: all
roles:
- fetch-javascript-output
- version-from-git
- fetch-javascript-tarball
- hosts: localhost
roles:
- hosts: all
tasks:
# project_ver is set by set_fact in version-from-git, but that runs on
# the remote host, which puts the fact into the hostvars of that host.
# Now that we're running on localhost, we need to reach in to the remote
# hosts vars to get the value.
- role: upload-npm
project_ver: "{{ hostvars['ubuntu-xenial']['project_ver'] }}"
- name: Upload to npm
include_role:
name: upload-npm
delegate_to: localhost