---
# file: roles/serverdensity/tasks/apache.yml

- name: "ServerDensity | Apache | Enable some required modules"
  apache_module:
    name={{ item }}
    state=present
  with_items:
    - status
  notify: "ServerDensity | Restart Apache"

- name: "ServerDensity | Apache | Configuration file for ServerDensity"
  template:
    src=etc-apache2-sites-available-sd-agent
    dest=/etc/apache2/sites-available/sd-agent{{ apache_conf_ext }}
    owner=root
    group=root
    mode=0644
  notify: "ServerDensity | Restart Apache"

- name: "ServerDensity | Apache | Enable the sd-agent site"
  command: a2ensite sd-agent creates=/etc/apache2/sites-enabled/sd-agent{{ apache_conf_ext }}
  notify: "ServerDensity | Restart Apache"
