Hi all We have a mix of Debian and Redhat in our infrastructure so basically for every single step, I have to add two of the same operators for both of them, like this:
- name: Install prerequisite packages action: apt pkg={{item}} state=installed with_items: - sysstat when: ansible_os_family == 'Debian' - name: Install prerequisite packages action: yum pkg={{item}} state=installed with_items: - sysstat when: ansible_os_family == 'RedHat' Does Ansible have an operator similar to the case operator in Ruby or Chef<http://docs.opscode.com/chef/dsl_recipe.html#case-statements>and Puppet for that matter? -- 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/8698728f-b185-4ba2-9b1f-b2bee476bba9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.