47 lines
1021 B
YAML
47 lines
1021 B
YAML
|
---
|
||
|
- name: Set up VPS
|
||
|
hosts: all
|
||
|
gather_facts: true
|
||
|
vars_files:
|
||
|
- vars/secrets.yml
|
||
|
become: true
|
||
|
|
||
|
# ----------------------------------------------------------------------------------------------------
|
||
|
|
||
|
pre_tasks:
|
||
|
- name: Lock root password
|
||
|
user: name=root password='!'
|
||
|
|
||
|
- name: Set hostname
|
||
|
command: "hostnamectl set-hostname {{ inventory_hostname }}"
|
||
|
|
||
|
- name: Set timezone to Asia/Singapore
|
||
|
community.general.timezone:
|
||
|
name: {{ TZ }}
|
||
|
become: true
|
||
|
|
||
|
- name: Install packages
|
||
|
apt:
|
||
|
name:
|
||
|
- iputils-ping
|
||
|
- cron
|
||
|
- git
|
||
|
- curl
|
||
|
- trash-cli
|
||
|
state: latest
|
||
|
install_recommends: false
|
||
|
update_cache: true
|
||
|
autoclean: true
|
||
|
autoremove: true
|
||
|
|
||
|
# ----------------------------------------------------------------------------------------------------
|
||
|
|
||
|
roles:
|
||
|
- nfs
|
||
|
- chrony
|
||
|
- fail2ban
|
||
|
- unattended-upgrades
|
||
|
- docker
|
||
|
#- docker-buildx
|
||
|
- ssh
|
||
|
- ufw
|