--- - name: Install Packages yum: name={{ item }} state=latest update_cache=yes with_items: - ntp - tcpdump - python3 - wget - openssl - curl - python3-pip when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' - name: Install Packages apt: name={{ item }} state=latest update_cache=yes with_items: - ntp - python3 - tcpdump - wget - openssl - curl - python3-pip when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'