PLAYBOOK TASKS

Ansible Terminal
- name: Ensure apache is installed and started
  hosts: web
  become: yes
  vars:
    http_port: 80
    http_docroot: /var/www/gokev.com

  tasks:
  - name: Ensure latest httpd package is present
    yum:
      name: httpd
      state: latest

  - name: Verify correct config file is present
    template:
      src: templates/httpd.conf.j2
      dest: /etc/httpd/conf/httpd.conf

  - name: Ensure httpd is started
    service:
      name: httpd
      state: started