---
#install denyhosts
- name: install denyhosts
  yum: name=denyhosts state=present
  tags:
  - packages

- name: /etc/denyhosts.conf
  copy: src=denyhosts.conf dest=/etc/denyhosts.conf
  notify:
  - restart denyhosts
  tags:
  - config

- name: /var/lib/denyhosts/allowed-hosts
  copy: src=allowed-hosts dest=/var/lib/denyhosts/allowed-hosts
  notify:
  - restart denyhosts
  tags:
  - config

- name: enable the service
  service: name=denyhosts state=running enabled=true
  tags:
  - service

