Added bootstrap role with the tasks, defaults and handlers necessary for the playbooks

This commit is contained in:
Alex Tavarez
2025-07-16 21:02:44 -04:00
parent b22c88e1ca
commit 85b1f6cd25
41 changed files with 2349 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
---
#@TODO write handlers for configuring clamav
#@NOTE https://wiki.archlinux.org/title/ClamAV
- name: Check if freshclam file exists
stat:
path: /etc/clamav/freshclam.conf
register: freshclampath
- name: Check if clamd file exists
stat:
path: /etc/clamav/clamd.conf
register: clamdpath
- name: Check if milter file exists
stat:
path: /etc/clamav/clamav-milter.conf
register: milterpath
- name: Create freshclam file if not exists
file:
path: /etc/clamav/freshclam.conf
stat: touch
register: freshclam_created
- name: Create freshclam file
become: yes
become_method: sudo
copy:
src: clamav/freshclam.conf
dest: /etc/clamav/freshclam.conf
force: yes
backup: yes
when: not freshclampath.stat.exists
- name: Create clamd file
become: yes
become_method: sudo
copy:
src: clamav/clamd.conf
dest: /etc/clamav/clamd.conf
force: yes
backup: yes
when: not freshclampath.stat.exists
- name: Create clamd file
become: yes
become_method: sudo
copy:
src: clamav/clamav-milter.conf
dest: /etc/clamav/clamav-milter.conf
force: yes
backup: yes
when: not freshclampath.stat.exists