Files
fedora-infra_ansible/roles/spamassassin/tasks/main.yml
2016-05-12 10:02:43 +00:00

45 lines
953 B
YAML

---
# tasklist for setting up a SpamAssassin server
- name: install the package
yum: pkg={{ item }} state=present
with_items:
- spamassassin
- perl-Razor-Agent
tags:
- packages
- name: create the specific group
group: name=spammy system=yes
tags:
- config
- name: create the specific user
user: name=spammy comment="spamassassin user" home=/home/spammy group=spammy createhome=yes system=yes shell=/sbin/nologin
tags:
- config
- name: setup the sysconfig file
copy: src=sysconfig dest=/etc/sysconfig/spamassassin
notify:
- restart spamassassin
tags:
- config
- name: setup the config file
copy: src=local.cf dest=/etc/mail/spamassassin/local.cf
notify:
- restart spamassassin
tags:
- config
- name: setup the cron job
copy: src=sa-update dest=/etc/cron.d/sa-update
tags:
- config
- name: set the service running/enabled
service: name=spamassassin enabled=true state=running
tags:
- service