--- # tasks file for python27 - name: Load meta vars include_vars: file: meta/main.yml name: meta - name: Assertions assert: that: - ansible_distribution in meta.galaxy_info.platforms|map(attribute='name') - | (meta.galaxy_info.platforms|selectattr('name', 'equalto', ansible_distribution)|first).versions|intersect([ansible_distribution_release, ansible_distribution_version])|length > 0 - python27_packages is iterable - name: APT install when: ansible_pkg_mgr == 'apt' apt: name: python-pip state: present update_cache: yes cache_valid_time: 3600 - name: pkg add when: ansible_pkg_mgr == 'openbsd_pkg' openbsd_pkg: name: py-pip state: present register: python27_pkg_add_pip - include: pip_symlink.yml when: ansible_os_family == 'OpenBSD' - include: sni.yml when: ansible_python_version|version_compare('2.7.9', '<') - name: pip install python27_packages with_items: '{{ python27_packages }}' pip: name: '{{ item }}' state: present