made caddy config modular

This commit is contained in:
Jef Roosens 2023-12-30 11:25:58 +01:00
parent c930ccc44a
commit e6409a0a0e
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
9 changed files with 39 additions and 24 deletions

View file

@ -1,10 +1,13 @@
- name: Install packages
- name: Ensure common packages are installed
apt:
name:
# Needed for handling GPG keys for repositories
- debian-keyring
- debian-archive-keyring
- apt-transport-https
- ca-certificates
- lsb-release
- gnupg
# Easy to edit files
- vim
@ -16,9 +19,24 @@
# Disk monitoring
- smartmontools
# Periodic tasks
- cron
state: present
- name: Install Vim config
- name: Ensure cron service is enabled
service:
name: cron
state: started
enabled: true
- name: Ensure fail2ban service is enabled
service:
name: fail2ban
state: started
enabled: true
- name: Ensure Vim config is present
get_url:
url: 'https://r8r.be/vim'
dest: '{{ item.dest }}'
@ -30,9 +48,3 @@
dest: "/home/debian/.vimrc"
- user: root
dest: "/root/.vimrc"
- name: Enable fail2ban
service:
name: fail2ban
state: started
enabled: true