1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_rspamd.git synced 2024-08-16 17:09:51 +02:00
ansible_role_rspamd/tasks/packages.yml

52 lines
1.2 KiB
YAML
Raw Normal View History

2021-01-21 20:50:04 +01:00
---
2023-10-29 15:42:13 +01:00
- name: Update repo-cache for debian/ubuntu
2021-01-21 20:50:04 +01:00
become: true
2022-04-07 23:10:30 +02:00
ansible.builtin.apt:
2021-01-21 20:50:04 +01:00
update_cache: true
cache_valid_time: 3600
2023-10-29 15:42:13 +01:00
- name: Install requirements to add new package repos
2021-01-21 20:50:04 +01:00
become: true
2022-04-07 23:10:30 +02:00
ansible.builtin.apt:
2023-10-29 15:42:13 +01:00
name: "{{ item }}"
state: 'present'
loop:
- 'lsb-release'
- 'wget'
- 'debian-goodies'
- 'apt-dater-host'
- 'apt-transport-https'
2021-01-21 20:50:04 +01:00
2023-10-29 15:42:13 +01:00
- name: Add rspam repo key
2021-01-21 20:50:04 +01:00
become: true
ansible.builtin.apt_key:
url: 'https://rspamd.com/apt-stable/gpg.key'
2023-10-29 15:42:13 +01:00
state: 'present'
notify: Run sudo apt update
2021-01-21 20:50:04 +01:00
2023-10-29 15:42:13 +01:00
- name: Add rspamd repo
2021-01-21 20:50:04 +01:00
become: true
ansible.builtin.apt_repository:
repo: "deb https://rspamd.com/apt-stable/ {{ ansible_distribution_release }} main"
2023-10-29 15:42:13 +01:00
state: 'present'
mode: '0644'
notify: Run sudo apt update
2021-01-21 20:50:04 +01:00
2023-10-29 15:42:13 +01:00
- name: Add rspamd srv-repo
2021-01-21 20:50:04 +01:00
become: true
ansible.builtin.apt_repository:
repo: "deb-src https://rspamd.com/apt-stable/ {{ ansible_distribution_release }} main"
2023-10-29 15:42:13 +01:00
state: 'present'
mode: '0644'
notify: Run sudo apt update
2021-01-21 20:50:04 +01:00
2023-10-29 15:42:13 +01:00
- name: Run update if something changed
2022-04-07 23:10:30 +02:00
ansible.builtin.meta: flush_handlers
2021-01-21 20:50:04 +01:00
2023-10-29 15:42:13 +01:00
- name: Install rspamd
2021-01-21 20:50:04 +01:00
become: true
2022-04-07 23:10:30 +02:00
ansible.builtin.apt:
2023-10-29 15:42:13 +01:00
name: 'rspamd'
state: 'present'
notify: Run systemctl restart rspamd