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

Add rspamd repo and install it

This commit is contained in:
L3D 2021-01-21 20:50:04 +01:00
parent e1ce0e3d4b
commit 60802cb191
Signed by: l3d
GPG key ID: CD08445BFF4313D1
4 changed files with 59 additions and 1 deletions

5
handlers/main.yml Normal file
View file

@ -0,0 +1,5 @@
---
- name: sudo apt update
become: true
apt:
update_cache: true

View file

@ -1,3 +1,7 @@
--- ---
- include_tasks: versioncheck.yml - include_tasks: versioncheck.yml
when: submodules_versioncheck|bool when: submodules_versioncheck|bool
- name: add apt repos and install rspamd
include_tasks: packages.yml
when: ansible_os_family == 'Debian'

49
tasks/packages.yml Normal file
View file

@ -0,0 +1,49 @@
---
- name: update repo-cache for debian/ubuntu
become: true
apt:
update_cache: true
cache_valid_time: 3600
- name: install requirements to add new package repos
become: true
apt:
name:
- lsb-release
- wget
- debian-goodies
- apt-dater-host
- apt-transport-https
state: present
- name: add rspam repo key
become: true
ansible.builtin.apt_key:
url: 'https://rspamd.com/apt-stable/gpg.key'
state: present
notify: 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: 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: sudo apt update
- name: run update if something changed
meta: flush_handlers
- name: install rspamd
become: true
apt:
name: rspamd
state: present

View file

@ -1,4 +1,4 @@
--- ---
# versionscheck # versionscheck
playbook_version_number: 02 # should be a integer playbook_version_number: 02 # should be a integer
playbook_version_path: 'role-<some_unique_string>.version' playbook_version_path: 'do1jlr.rspamd.version'