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

Merge branch 'main' into u

Signed-off-by: L3D <l3d@c3woc.de>
This commit is contained in:
L3D 2023-10-29 23:51:54 +01:00 committed by GitHub
commit dddbfab74a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 111 additions and 56 deletions

9
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,9 @@
---
# See https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

View file

@ -2,21 +2,21 @@
name: Ansible Lint check name: Ansible Lint check
# yamllint disable-line rule:truthy # yamllint disable-line rule:truthy
on: on: [push, pull_request]
push:
branches: '*'
pull_request:
branches: '*'
jobs: jobs:
build: build:
name: Ansible Lint
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: 'checkout git repo' - name: Checkout git repo
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: 'Lint Ansible Playbook'
uses: ansible/ansible-lint-action@v6
with: with:
targets: "." submodules: true
fetch-depth: 0
- name: Run ansible-lint
uses: ansible-actions/ansible-lint-action@v1.0.2
with:
target: "./"

24
.github/workflows/galaxy.yml vendored Normal file
View file

@ -0,0 +1,24 @@
---
name: Galaxy-NG Roles Import
# yamllint disable-line rule:truthy
on:
release:
types: ['created']
jobs:
build:
name: Galaxy Role Importer
runs-on: ubuntu-latest
steps:
- name: 'Checkout git repo'
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: 'Release on galaxy'
uses: ansible-actions/ansible-galaxy-action@v1.1.1
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}

22
.github/workflows/j2lint-check.yml vendored Normal file
View file

@ -0,0 +1,22 @@
---
name: Jinja2 Linting check
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
name: Jinja2 Linting
runs-on: ubuntu-latest
steps:
- name: Checkout git repo
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Run j2lint
uses: ansible-actions/j2lint-action@v0.0.1
with:
target: "./"

22
.github/workflows/yamllint-check.yml vendored Normal file
View file

@ -0,0 +1,22 @@
---
name: Yamllint check
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
name: Yamllint
runs-on: ubuntu-latest
steps:
- name: Checkout git repo
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Run yamllint
uses: ansible-actions/yamllint-action@v0.0.1
with:
target: "./"

View file

@ -1,23 +0,0 @@
---
name: 'Yamllint GitHub Actions'
# yamllint disable-line rule:truthy
on:
push:
branches: '*'
pull_request:
branches: '*'
jobs:
yamllint:
name: 'Yamllint'
runs-on: ubuntu-latest
steps:
- name: 'checkout git repo'
uses: actions/checkout@v3
- name: 'Yamllint'
uses: karancode/yamllint-github-action@v2.0.0
with:
yamllint_file_or_dir: '.'
yamllint_config_filepath: './.yamllint'

View file

@ -1,7 +1,7 @@
--- ---
- name: rspamd password generation - name: Rspamd password generation
block: block:
- name: configure rspamd password - name: Configure rspamd password
become: true become: true
ansible.builtin.template: ansible.builtin.template:
src: templates/worker-controller.inc.j2 src: templates/worker-controller.inc.j2
@ -11,7 +11,7 @@
group: "{{ rspamd__default_group }}" group: "{{ rspamd__default_group }}"
notify: Run systemctl restart rspamd notify: Run systemctl restart rspamd
rescue: rescue:
- name: you have to install passlib - name: You have to install passlib
ansible.builtin.fail: ansible.builtin.fail:
msg: 'I caught an error. Maybe you have to install passlib via pip3' msg: 'I caught an error. Maybe you have to install passlib via pip3'
@ -25,7 +25,7 @@
mode: '0640' mode: '0640'
notify: Run systemctl restart rspamd notify: Run systemctl restart rspamd
- name: milter_headers.conf - name: Configure milter_headers.conf
become: true become: true
ansible.builtin.copy: ansible.builtin.copy:
src: files/milter_headers.conf src: files/milter_headers.conf
@ -35,7 +35,7 @@
mode: '0640' mode: '0640'
notify: Run systemctl restart rspamd notify: Run systemctl restart rspamd
- name: milter_headers.conf - name: Configure classifier-bayes.conf
become: true become: true
ansible.builtin.copy: ansible.builtin.copy:
src: files/classifier-bayes.conf src: files/classifier-bayes.conf
@ -55,7 +55,7 @@
mode: '0640' mode: '0640'
notify: Run systemctl restart rspamd notify: Run systemctl restart rspamd
- name: classifier-bayes.conf - name: Modify classifier-bayes.conf
become: true become: true
ansible.builtin.copy: ansible.builtin.copy:
src: files/classifier-bayes.conf src: files/classifier-bayes.conf
@ -75,7 +75,7 @@
mode: '0640' mode: '0640'
notify: Run systemctl restart rspamd notify: Run systemctl restart rspamd
- name: multimap whitelist_ip.map - name: Multimap whitelist_ip.map
become: true become: true
ansible.builtin.copy: ansible.builtin.copy:
src: "{{ rspamd__whitelist_ip_file }}" src: "{{ rspamd__whitelist_ip_file }}"
@ -85,7 +85,7 @@
mode: '0640' mode: '0640'
notify: Run systemctl restart rspamd notify: Run systemctl restart rspamd
- name: multimap whitelist_from.map - name: Multimap whitelist_from.map
become: true become: true
ansible.builtin.copy: ansible.builtin.copy:
src: "{{ rspamd__whitelist_from_file }}" src: "{{ rspamd__whitelist_from_file }}"
@ -95,7 +95,7 @@
mode: '0640' mode: '0640'
notify: Run systemctl restart rspamd notify: Run systemctl restart rspamd
- name: multimap blacklist_ip.map - name: Multimap blacklist_ip.map
become: true become: true
ansible.builtin.copy: ansible.builtin.copy:
src: "{{ rspamd__blacklist_ip_file }}" src: "{{ rspamd__blacklist_ip_file }}"
@ -105,7 +105,7 @@
mode: '0640' mode: '0640'
notify: Run systemctl restart rspamd notify: Run systemctl restart rspamd
- name: multimap blacklist_from.map - name: Multimap blacklist_from.map
become: true become: true
ansible.builtin.copy: ansible.builtin.copy:
src: "{{ rspamd__blacklist_from_file }}" src: "{{ rspamd__blacklist_from_file }}"

View file

@ -1,5 +1,5 @@
--- ---
- name: Run optional versioncheck - name: Run Optional Versioncheck
ansible.builtin.include_tasks: ansible.builtin.include_tasks:
file: 'versioncheck.yml' file: 'versioncheck.yml'
when: submodules_versioncheck | bool when: submodules_versioncheck | bool
@ -18,7 +18,8 @@
file: 'dkim.yml' file: 'dkim.yml'
when: rspamd__configure_dkim | bool when: rspamd__configure_dkim | bool
- name: redis backend
- name: Redis backend
ansible.builtin.include_tasks: ansible.builtin.include_tasks:
file: 'redis.yml' file: 'redis.yml'
when: rspamd__configure_redis | bool when: rspamd__configure_redis | bool

View file

@ -9,15 +9,15 @@
become: true become: true
ansible.builtin.apt: ansible.builtin.apt:
name: "{{ item }}" name: "{{ item }}"
state: present state: 'present'
loop: loop:
- 'lsb-release' - 'lsb-release'
- 'wget' - 'wget'
- 'debian-goodies' - 'debian-goodies'
- 'apt-dater-host' - 'apt-dater-host'
- #apt-transport-https' - 'apt-transport-https'
- name: add rspam repo key - name: Add rspam repo key
become: true become: true
ansible.builtin.apt_key: ansible.builtin.apt_key:
url: 'https://rspamd.com/apt-stable/gpg.key' url: 'https://rspamd.com/apt-stable/gpg.key'
@ -38,7 +38,7 @@
ansible.builtin.apt_repository: ansible.builtin.apt_repository:
repo: "deb [signed-by=/etc/apt/keyrings/rspamd.gpg] https://rspamd.com/apt-stable/ {{ ansible_distribution_release }} main" repo: "deb [signed-by=/etc/apt/keyrings/rspamd.gpg] https://rspamd.com/apt-stable/ {{ ansible_distribution_release }} main"
state: present state: present
mode: 0644 mode: '0644'
notify: Run sudo apt update notify: Run sudo apt update
- name: Add rspamd srv-repo - name: Add rspamd srv-repo
@ -46,7 +46,7 @@
ansible.builtin.apt_repository: ansible.builtin.apt_repository:
repo: "deb-src [signed-by=/etc/apt/keyrings/rspamd.gpg] https://rspamd.com/apt-stable/ {{ ansible_distribution_release }} main" repo: "deb-src [signed-by=/etc/apt/keyrings/rspamd.gpg] https://rspamd.com/apt-stable/ {{ ansible_distribution_release }} main"
state: present state: present
mode: 0644 mode: '0644'
notify: Run sudo apt update notify: Run sudo apt update
- name: Run update if something changed - name: Run update if something changed
@ -55,6 +55,6 @@
- name: Install rspamd - name: Install rspamd
become: true become: true
ansible.builtin.apt: ansible.builtin.apt:
name: rspamd name: 'rspamd'
state: present state: 'present'
notify: Run systemctl restart rspamd notify: Run systemctl restart rspamd

View file

@ -9,5 +9,5 @@
- name: Install redis backend - name: Install redis backend
become: true become: true
ansible.builtin.apt: ansible.builtin.apt:
name: redis name: 'redis'
state: present state: 'present'