Currently I have the following.  

  tasks:
    - name: install the Debian packages
      apt: name={{ item }} state=latest
      with_items: "{{ packages }}"
      when: ansible_os_family == "Debian"

    - name: install the RedHat packages
      yum: pkg={{ item }} state=latest
      with_items: "{{ packages }}"
      when: ansible_os_family == "RedHat"

Is there anyway to have one task?  I have packages array dynamically 
created.  I wish at least I can just have tasks completely ignored if it is 
on the wrong OS, so it won't be included....





-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/02f37300-db62-4f70-87ec-8a175aa7c388%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to