- hosts: ubuntu-xenial
  roles:
    - fetch-javascript-output
    - version-from-git
    - fetch-javascript-tarball

- hosts: localhost
  roles:
    # 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'] }}"

- hosts: all
  roles:
    - fetch-javascript-output
    - version-from-git
    - fetch-javascript-tarball

- 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.
    - name: Upload to npm
      include_role:
        name: upload-npm
      delegate_to: localhost

Use include_role and delegate_to for upload-npm
Use include_role and delegate_to for upload-npm

Change-Id: I92fe1a3d2fe7e886723cdbc6495933795040e8b3
