- hosts: all
  pre_tasks:
    - name: Ensure pip
      include_role:
        name: ensure-pip

    - name: Install git-review
      pip:
        name: git-review
        virtualenv: /opt/git-review
        virtualenv_command: '{{ ensure_pip_virtualenv_command }}'
      become: yes

    - name: Link git-review
      file:
        src: /opt/git-review/bin/git-review
        dest: /usr/local/bin/git-review
        owner: root
        group: root
        state: link
      become: yes

    - name: Copy scripts to the script dir on the node
      copy:
        dest: '{{ ansible_user_dir }}/scripts/'
        src: '{{ item }}'
        mode: 0755
      with_items:
        - generate_puppetfile.sh
        - propose_update.sh
        - sync_openstack_ansible_common_files.sh

  roles:
    - role: configure-git
      git_config:
        user.name: OpenStack Proposal Bot
        user.email: openstack-infra@lists.openstack.org
        gitreview.username: proposal-bot
    - copy-proposal-common-scripts
      # For propose-update-constraints
    - copy-release-tools-scripts
    - add-sshkey
    - bindep
    - ensure-python
    - ensure-tox

- hosts: all
  pre_tasks:
    - name: Ensure pip
      include_role:
        name: ensure-pip

    - name: Install git-review
      pip:
        name: git-review
        virtualenv: /opt/git-review
        virtualenv_command: '{{ ensure_pip_virtualenv_command }}'
      become: yes

    - name: Link git-review
      file:
        src: /opt/git-review/bin/git-review
        dest: /usr/local/bin/git-review
        owner: root
        group: root
        state: link
      become: yes

    - name: Copy scripts to the script dir on the node
      copy:
        dest: '{{ ansible_user_dir }}/scripts/'
        src: '{{ item }}'
        mode: 0755
      with_items:
        - generate_puppetfile.sh
        - propose_update.sh
        - sync_openstack_ansible_common_files.sh

  roles:
    - role: configure-git
      git_config:
        user.name: OpenStack Proposal Bot
        user.email: openstack-infra@lists.openstack.org
        gitreview.username: proposal-bot
    - copy-proposal-common-scripts
      # For propose-update-constraints
    - copy-release-tools-scripts
    - add-sshkey
    - bindep
    - ensure-python
    - role: ensure-tox
      ensure_global_symlinks: true

Make tox global for update proposal jobs
Make tox global for update proposal jobs

If00afb50c37b45aefbb45070da4efef3e43e62b2 updated the requirements
update job to use tox as part of the update checking script. We have
ensure-tox as one of the roles in the pre playbook for this job, but it
is not set to be made available globally, which results in the script
failing with being unable to find tox.

This updates the role inclusion to set ensure_global_symlinks: true so
tox will be available in the script.

Change-Id: I5d3ed4ce62cd8df604802fedf522d644d5664698
Signed-off-by: Sean McGinnis <961eeb09b6d45516665e15b82e013282c4faf575@gmail.com>
