---

- name: Ensure Apache HTTP server is installed (CentOS)
  apt: name={{ item }} state=present update_cache=yes
  with_items:
    - httpd
  become: yes

---

- name: Ensure Apache HTTP server is installed (CentOS)
  yum: name={{ item }} state=present update_cache=yes
  with_items:
    - httpd
  become: yes

Fix installation task for CentOS
Fix installation task for CentOS
