- block: - name: Ensuring python3-pip and support packages are present when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' fail: msg: "CentoOS or RHEL is not currently supported" - name: Ensuring python3-pip and support packages are present become: true when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' apt: name: - python3-pip - python3-libvirt - python-libvirt state: present - name: Install required pip packages pip: name: "{{ item }}" executable: pip3 with_items: - pyOpenSSL - passlib become: true