homelab/roles/common/tasks/main.yml

57 lines
1.1 KiB
YAML
Raw Normal View History

2023-12-30 11:25:58 +01:00
- name: Ensure common packages are installed
2023-12-24 17:58:49 +01:00
apt:
name:
# Needed for handling GPG keys for repositories
- debian-keyring
- debian-archive-keyring
- apt-transport-https
2023-12-30 11:25:58 +01:00
- ca-certificates
- lsb-release
- gnupg
2023-12-24 17:58:49 +01:00
# Easy to edit files
- vim
- tmux
- htop
2023-12-24 20:52:13 +01:00
# Spam prevention
- fail2ban
# Disk monitoring
- smartmontools
2023-12-30 11:25:58 +01:00
# Periodic tasks
- cron
# General compression tools
- bzip2
# Working with BTRFS file systems
- btrfs-progs
2023-12-24 17:58:49 +01:00
state: present
2023-12-30 11:25:58 +01:00
- 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
2023-12-24 17:58:49 +01:00
get_url:
url: 'https://r8r.be/vim'
dest: '{{ item.dest }}'
owner: "{{ item.user }}"
group: "{{ item.user }}"
mode: '644'
with_items:
- user: debian
dest: "/home/debian/.vimrc"
- user: root
dest: "/root/.vimrc"