My first thought is to create a new task and use a when clause: - hosts: mt1-dummys101 tasks: - name: Install apt packages sudo: true apt: pkg={{ item }} with_items: - build-essential - libyaml-dev - python2.7-dev
- name: Install apt packages for version 14 sudo: true apt: pkg={{ item }} with_items: - silversearcher-ag when: ansible_distribution_major_version == '14' -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0ed34123-9271-41e8-b6ba-b99c275323fc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.