mirror of
https://github.com/roles-ansible/ansible_role_rspamd.git
synced 2024-08-16 17:09:51 +02:00
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
---
|
|
- name: Update repo-cache for debian/ubuntu
|
|
become: true
|
|
ansible.builtin.apt:
|
|
update_cache: true
|
|
cache_valid_time: 3600
|
|
|
|
- name: Install requirements to add new package repos
|
|
become: true
|
|
ansible.builtin.apt:
|
|
name: "{{ item }}"
|
|
state: 'present'
|
|
loop:
|
|
- 'lsb-release'
|
|
- 'wget'
|
|
- 'debian-goodies'
|
|
- 'apt-dater-host'
|
|
- 'apt-transport-https'
|
|
|
|
- name: Add rspam repo key
|
|
become: true
|
|
ansible.builtin.apt_key:
|
|
url: 'https://rspamd.com/apt-stable/gpg.key'
|
|
state: 'present'
|
|
notify: Run sudo apt update
|
|
|
|
- name: Add rspamd repo
|
|
become: true
|
|
ansible.builtin.apt_repository:
|
|
repo: "deb https://rspamd.com/apt-stable/ {{ ansible_distribution_release }} main"
|
|
state: 'present'
|
|
mode: '0644'
|
|
notify: Run sudo apt update
|
|
|
|
- name: Add rspamd srv-repo
|
|
become: true
|
|
ansible.builtin.apt_repository:
|
|
repo: "deb-src https://rspamd.com/apt-stable/ {{ ansible_distribution_release }} main"
|
|
state: 'present'
|
|
mode: '0644'
|
|
notify: Run sudo apt update
|
|
|
|
- name: Run update if something changed
|
|
ansible.builtin.meta: flush_handlers
|
|
|
|
- name: Install rspamd
|
|
become: true
|
|
ansible.builtin.apt:
|
|
name: 'rspamd'
|
|
state: 'present'
|
|
notify: Run systemctl restart rspamd
|