--- - name: install pillow prerequisites for Ubuntu < 14.04 apt: pkg: - libjpeg8-dev - libtiff4-dev - tcl8.5-dev - tk8.5-dev state: present force: yes when: ansible_distribution_version | version_compare('14.04', 'lt') - name: install pillow prerequisites for Ubuntu >= 14.04 apt: pkg: - libjpeg8-dev - libtiff5-dev - tcl8.6-dev - tk8.6-dev state: present force: yes when: ansible_distribution_version | version_compare('14.04', 'ge') - name: install pdf prerequisites for Ubuntu < 18.04 apt: pkg: - libssl-dev state: present force: yes when: ansible_distribution_version | version_compare('18.04', 'lt') - name: install pdf prerequisites for Ubuntu >= 18.04 apt: pkg: - libssl1.0-dev state: present force: yes when: ansible_distribution_version | version_compare('18.04', 'ge') ...