- name: Install essential packages ansible.builtin.yum: name: - vim - curl - htop - net-tools state: present when: ansible_os_family == "RedHat" - name: Install essential packages on Debian/Ubuntu ansible.builtin.apt: name: - vim - curl - htop - net-tools state: present update_cache: yes when: ansible_os_family == "Debian"