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 and Puppet for that matter?