---
- name: install epylog packages
  package: state=present name={{item}}
  with_items:
  - epylog
  - mod_auth_gssapi
  tags:
  - packages
  - epylog

- name: create directories needed for epylog
  file: state=directory path={{ item }} owner=root mode=755
  with_items:
  - /var/lib/epylog/merged
  - /srv/web/epylog
  - /srv/web/epylog/merged
  tags:
  - epylog

- name: setup extra epylog modules
  copy: src={{ item }} dest=/usr/share/epylog/{{ item }}
  with_items:
  - modules/selinux_mod.py
  - modules/rsyncd_mod.py
  - modules/sudo_mod.py
  - modules/common_unparsed_mod.py
  - modules/logins_mod.py
  - modules/kojiload_mod.py
  tags:
  - epylog

- name: epylog cron
  copy: src=epylog-default.cron dest=/etc/{{ item }}/epylog.cron
  with_items:
  - cron.d
  - cron.daily
  tags:
  - config
  - cron
  - epylog

- name: copy in all the epylog merged files
  copy: src=merged dest=/etc/epylog/
  tags:
  - config
  - epylog

- name: epylog merged cron
  copy: src=epylog-merged.cron dest=/etc/cron.d/epylog-merged.cron
  tags:
  - config
  - cron
  - epylog

- name: epylog httpd config
  copy: src=epylog-web.conf dest=/etc/httpd/conf.d/epylog-web.conf
  notify:
  - reload httpd
  tags:
  - config
  - apache
  - epylog
