---
- hosts: all
  become: yes

  tasks:
    - name: Update apt cache.
      apt: update_cache=yes
      when: ansible_os_family == 'Debian'

    - name: Install test dependencies (RedHat).
      package: name=logrotate state=present
      when: ansible_os_family == 'RedHat'

    - name: Copy initctl_faker into place for Ubuntu 14.04.
      copy:
        src: initctl_faker
        dest: /sbin/initctl
        mode: 0755
        force: yes
      when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '14.04'
      changed_when: false

---
- hosts: all
  become: yes

  tasks:
    - name: Update apt cache.
      apt: update_cache=yes
      when: ansible_os_family == 'Debian'

    - name: Install test dependencies (RedHat).
      package: name=logrotate state=present
      when: ansible_os_family == 'RedHat'

    - name: Override postfix_inet_protocols (RHEL).
      set_fact:
        postfix_inet_protocols: ipv4
      when: ansible_os_family == 'RedHat'

    - name: Copy initctl_faker into place for Ubuntu 14.04.
      copy:
        src: initctl_faker
        dest: /sbin/initctl
        mode: 0755
        force: yes
      when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '14.04'
      changed_when: false

Fix breaking CentOS 7 test.
Fix breaking CentOS 7 test.
