---
- name: Set up Media Cloud
  hosts: all
  any_errors_fatal: true
  gather_facts: no
  pre_tasks:
    - name: Install Python 2.7 for Ansible on Ubuntu
      raw: if [ `uname` != 'Darwin' ]; then sudo apt-get -y install python-simplejson; fi
    - name: Reload ansible_facts
      setup:
    - name: Install Aptitude  # https://github.com/ansible/ansible/issues/16884
      raw: apt-get -y install python-minimal aptitude
      become: true
      become_user: root
      become_method: sudo
      when: ansible_distribution == 'Ubuntu'
  roles:
    - common

---
- name: Set up Media Cloud
  hosts: all
  any_errors_fatal: true
  gather_facts: no
  pre_tasks:
    - name: Verify Ansible meets Drupal VM's version requirements.
      assert:
        that: "ansible_version.full | version_compare('2.3.2.0', '>=')"
        msg: "Please upgrade your Ansible to a newer version."
    - name: Install Python 2.7 for Ansible on Ubuntu
      raw: if [ `uname` != 'Darwin' ]; then sudo apt-get -y install python-simplejson; fi
    - name: Reload ansible_facts
      setup:
    - name: Install Aptitude  # https://github.com/ansible/ansible/issues/16884
      raw: apt-get -y install python-minimal aptitude
      become: true
      become_user: root
      become_method: sudo
      when: ansible_distribution == 'Ubuntu'
  roles:
    - common

Verify that Ansible is new enough
Verify that Ansible is new enough
