2023-11-11 02:06:42 +08:00
|
|
|
---
|
|
|
|
- name: Set up VPS
|
2023-11-17 03:02:20 +08:00
|
|
|
hosts: oracle,vultr
|
2023-11-13 11:47:39 +08:00
|
|
|
# gather_facts: true
|
2023-11-11 02:06:42 +08:00
|
|
|
vars_files:
|
2023-11-13 11:47:39 +08:00
|
|
|
- vars/secrets.yaml
|
2023-11-11 02:06:42 +08:00
|
|
|
become: true
|
2024-10-29 18:05:22 +08:00
|
|
|
tasks:
|
2023-11-11 02:06:42 +08:00
|
|
|
# ----------------------------------------------------------------------------------------------------
|
|
|
|
|
2024-10-29 18:05:22 +08:00
|
|
|
- name: Install packages
|
|
|
|
apt:
|
|
|
|
name:
|
|
|
|
- iputils-ping
|
|
|
|
- cron
|
|
|
|
- fzf
|
|
|
|
- git
|
|
|
|
- curl
|
|
|
|
- zip
|
|
|
|
- unzip
|
|
|
|
- trash-cli
|
|
|
|
state: latest
|
|
|
|
install_recommends: false
|
|
|
|
update_cache: true
|
|
|
|
autoclean: true
|
|
|
|
autoremove: true
|
2023-11-25 08:10:49 +08:00
|
|
|
|
2023-11-11 02:06:42 +08:00
|
|
|
# ----------------------------------------------------------------------------------------------------
|
|
|
|
|
2024-10-29 18:05:22 +08:00
|
|
|
- name: Include roles
|
|
|
|
include_role:
|
|
|
|
name: "{{ item }}"
|
|
|
|
loop:
|
|
|
|
- disable-root
|
|
|
|
- timezone
|
|
|
|
- chrony
|
|
|
|
- vps-sources-list
|
|
|
|
- vps-ufw
|
|
|
|
- ssh
|
|
|
|
- fail2ban
|
|
|
|
- unattended-upgrades
|
|
|
|
- nfs-opnxng
|
|
|
|
- docker
|
|
|
|
- touch-hushlogin
|
|
|
|
- set-vm-overcommit-memory
|
|
|
|
#- docker-buildx
|
|
|
|
|
|
|
|
- name: Include roles
|
|
|
|
include_role:
|
|
|
|
name: "{{ item }}"
|
|
|
|
loop:
|
|
|
|
- oracle-systemd-resolved
|
|
|
|
- oracle-grub-opnxng
|
|
|
|
- hostname
|
|
|
|
when:
|
|
|
|
- inventory_hostname in groups["oracle"]
|