- hosts: primary
  tasks:

    - name: Ensure artifacts directory exists
      file:
        path: '{{ zuul.executor.work_root }}/artifacts'
        state: directory
      delegate_to: localhost

    - name: Copy files from {{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }} on node
      synchronize:
        src: '{{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }}/'
        dest: '{{ zuul.executor.work_root }}/artifacts/images'
        mode: pull
        copy_links: true
        verify_host: true
        rsync_opts:
          - --include=/mistral-docker.tar.gz
          - --include=*/
          - --exclude=*
          - --prune-empty-dirs

- hosts: all
  tasks:

    - name: Ensure artifacts directory exists
      file:
        path: '{{ zuul.executor.work_root }}/artifacts'
        state: directory
      delegate_to: localhost

    - name: Copy files from {{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }} on node
      synchronize:
        src: '{{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }}/'
        dest: '{{ zuul.executor.work_root }}/artifacts/images'
        mode: pull
        copy_links: true
        verify_host: true
        rsync_opts:
          - --include=/mistral-docker.tar.gz
          - --include=*/
          - --exclude=*
          - --prune-empty-dirs

Fix docker image publish job
Fix docker image publish job

The wrong inventory name was being used in the post playbook for the
docker image build. This fixes that.

Change-Id: Ib416068016a663c7440f61fa0194f92eea1bee16
