mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-04 01:54:40 +08:00
45 lines
953 B
YAML
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
|