51 lines
973 B
YAML
51 lines
973 B
YAML
- 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
|
|
- tmux
|
|
- htop
|
|
|
|
# Spam prevention
|
|
- fail2ban
|
|
|
|
# Disk monitoring
|
|
- smartmontools
|
|
|
|
# Periodic tasks
|
|
- cron
|
|
state: present
|
|
|
|
- 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 }}'
|
|
owner: "{{ item.user }}"
|
|
group: "{{ item.user }}"
|
|
mode: '644'
|
|
with_items:
|
|
- user: debian
|
|
dest: "/home/debian/.vimrc"
|
|
- user: root
|
|
dest: "/root/.vimrc"
|