A collection of Ansible playbooks I use to provision things.
Go to file
Simon 258777f168
delay docker clean timer at boot
2024-03-11 08:43:55 +01:00
ansible-docker-ubuntu delay docker clean timer at boot 2024-03-11 08:43:55 +01:00
ansible-vps-setup add VPS provisioning playbook 2022-04-28 20:56:42 +07:00
.gitignore initial commit, docker playbook 2022-04-19 21:40:54 +07:00
README.md note about 22.01 ssh socket incompatibility 2023-02-09 11:04:13 +07:00

README.md

Ansible Playbooks

A collection of Ansible playbooks I use to provision things.

Ansible VPS setup

Ansible playbook to provision a plain Ubuntu VPS from digitalocean. Expects ssh access for user root.

  • Create user
  • Secure ssh
  • Configure ufw

Setup

Copy or rename vars.samle.yml to vars.yml and set:

  • regular_user: Default username to create
  • user_password: Password for new user
  • sshd_port: Change ssh port

Note

The port change is tested for Ubuntu 20.04 LTS and 22.04 LTS. This wont work for 21.10, as ubuntu changed ssh to use socket based activation.

Run on a single host

ansible-playbook -i $hostname, ansible-vps-setup/playbook.yml

Ansible Docker Ubuntu

Ansible playbook to provision an standart Ubuntu LTS server VM. Expects the user regular_user to be already created.

  • update and upgrade repo packages
  • install basic necessities
  • install docker
  • install docker compose
  • copy frequently used config files
  • configure swap
  • install maintenance services to clean trash and docker build cache

Setup

Copy or rename vars.samle.yml to vars.yml and set:

  • regular_user: Default username

Run on a single host

ansible-playbook -i $hostname, -K ansible-docker-ubuntu/playbook.yml