mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-02 14:30:45 +08:00
This will unify all the handlers to use first uppercase letter for ansible-lint to stop complaining. I went through all `notify:` occurrences and fixed them by running ``` set TEXT "text_to_replace"; set REPLACEMENT "replacement_text"; git grep -rlz "$TEXT" . | xargs -0 sed -i "s/$TEXT/$REPLACEMENT/g" ``` Then I went through all the changes and removed the ones that wasn't expected to be changed. Fixes https://pagure.io/fedora-infrastructure/issue/12391 Signed-off-by: Michal Konecny <mkonecny@redhat.com>
50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
---
|
|
# tasklist for setting up a SpamAssassin server
|
|
|
|
- name: Install the package
|
|
ansible.builtin.package: name={{ 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
|
|
ansible.builtin.copy: src=sysconfig dest=/etc/sysconfig/spamassassin
|
|
notify:
|
|
- Restart spamassassin
|
|
tags:
|
|
- config
|
|
|
|
- name: Setup the config file
|
|
ansible.builtin.copy: src=local.cf dest=/etc/mail/spamassassin/local.cf
|
|
notify:
|
|
- Restart spamassassin
|
|
tags:
|
|
- config
|
|
|
|
- name: Setup the cron job
|
|
ansible.builtin.copy: src=sa-update dest=/etc/cron.d/sa-update
|
|
tags:
|
|
- config
|
|
|
|
- name: Set the service running/enabled
|
|
service: name=spamassassin enabled=true state=started
|
|
tags:
|
|
- service
|
|
|
|
- name: Setup logrotate to our needs
|
|
ansible.builtin.copy: src="spamassassin.logrotate" dest=/etc/logrotate.d/spamassassin
|
|
tags:
|
|
- config
|