Catalogue of Ansible playbooks and helper scripts for server management
Go to file
2023-03-06 15:03:09 +01:00
gitlab Update gitlab role + add misc role 2022-02-14 01:02:14 +01:00
inventory feat(k3s): Add label injection for nodes 2023-03-05 12:23:42 +01:00
k3s-ansible@8e7081243b Add k3s-ansible playbook from Jeff Geerling 2022-06-11 02:22:02 +02:00
misc Update gitlab role + add misc role 2022-02-14 01:02:14 +01:00
node-configuration Holyday tmp 2022-06-24 20:38:52 +02:00
postgresql_cluster@d5c67c8422 Holyday tmp 2022-06-24 20:38:52 +02:00
wireguard@11883d85c9 Add wireguard playbook repository 2022-06-11 02:28:30 +02:00
.gitmodules Holyday tmp 2022-06-24 20:38:52 +02:00
backup.yml Update gitlab role + add misc role 2022-02-14 01:02:14 +01:00
init.yml build(makefile): improve stacked execution with custom environments, for better summary 2023-03-06 15:03:09 +01:00
Makefile build(makefile): improve stacked execution with custom environments, for better summary 2023-03-06 15:03:09 +01:00
README.md feat(k3s): Disable embeded LB 2022-11-16 23:53:26 +01:00

Ansible

Catalogue of Ansible playbooks and helper scripts for server management

Node configuration process

Setup user configuration

  • Create provisioning user without password and sudo
  • Create tanguy user with password
  • Disable root login (passwd --lock root)

SSH Setup

  • Install fail2ban
  • Disable SSH password login
  • Change SSH port

Miscellaneous

  • Test if unattended-upgrade is installed
  • Disable if true
  • Disable IPv6
  • Setup hostname

Softwares

  • Install k3s with token
  • Install OMV for NAS node*(s)

Update system

  • General package manager update

Additional configuration

  • Add label to output node on k3s to enable load balancer

Notes

Running the configuration for a node without inventory

ansible-playbook init.yml -i <ips-separated-by-commas> -u creator --private-key <path-to-ssh-key> --ask-become --extra-vars '{"hostname": "foo"}'

Running the configuration for a node with inventory

  • Add node to inventory
  • Add node to virgin group
  • Run following command
ansible-playbook init.yml -i inventory --limit virgin

Initiate the cluster from scratch

make all