- hosts: all
  roles:
    - bindep
    - ensure-tox
    - revoke-sudo
  tasks:
    - name: Checkout requirements branch for tag
      shell:
        cmd: |
          set -x
          # See if the tag appears on a stable branch
          TARGET_BRANCH=`git -C \
              {{ ansible_user_dir }}/{{ zuul.project.src_dir }} branch -a \
              --contains {{ zuul.ref }} | grep ' stable/' | sort | head -n1`
          # And if it does, then try to check out the same branch of the
          # requirements repo, but if that doesn't exist then we leave it
          # as we found it
          if [ -n "$TARGET_BRANCH" ]; then
              git checkout $TARGET_BRANCH || true
          done
        executable: /bin/bash
        chdir: "{{ zuul.projects['git.openstack.org/openstack/requirements'].src_dir }}"

- hosts: all
  roles:
    - bindep
    - ensure-tox
    - revoke-sudo
  tasks:
    - name: Checkout requirements branch for tag
      shell:
        cmd: |
          set -x
          # See if the tag appears on a stable branch
          TARGET_BRANCH=`git -C \
              {{ ansible_user_dir }}/{{ zuul.project.src_dir }} branch -a \
              --contains {{ zuul.ref }} | grep ' stable/' | sort | head -n1`
          # And if it does, then try to check out the same branch of the
          # requirements repo, but if that does not exist then we leave it
          # as we found it
          if [ -n "$TARGET_BRANCH" ]; then
              git checkout $TARGET_BRANCH || true
          done
        executable: /bin/bash
        chdir: "{{ zuul.projects['git.openstack.org/openstack/requirements'].src_dir }}"

Fix parsing error due to quote in comment
Fix parsing error due to quote in comment

Presence of a ' in the cmd comment causing an ansible
parsing error.

Change-Id: I97cee489976e5f1569b23eb84839c5ca9cd3547a
