--- - block: - name: Get the pandoc deb package get_url: url={{pandoc_pkg_url}} dest=/srv/{{ pandoc_pkg_file }} - name: Install the pandoc deb package apt: deb=/srv/{{ pandoc_pkg_file }} when: ansible_facts['distribution_version'] is version('16.04', '<') tags: pandoc - block: - name: Install the pandoc deb package, distribution version apt: pkg=pandoc state=present cache_valid_time=3600 when: ansible_facts['distribution_version'] is version('16.04', '>=') tags: pandoc