Ansible playbooks to setup Debian or RHEL-compatible VPS with basic configuration.
Go to file
Jeffrey Serio f1d68d12af Update 'reboot_check.yml' 2023-05-06 20:36:49 +00:00
LICENSE Initial commit 2023-03-08 09:41:56 -06:00
README.md Initial commit 2023-03-08 09:41:56 -06:00
debian-setup.yml Initial commit 2023-03-08 09:41:56 -06:00
reboot_check.yml Update 'reboot_check.yml' 2023-05-06 20:36:49 +00:00
rhel-setup.yml Initial commit 2023-03-08 09:41:56 -06:00

README.md

ansible-playbooks

For setting up Debian or RHEL-compatible virtual private servers (e.g., on Linode, Digital Ocean, etc).

I have a hosts.ini file that looks something like this:

[servers]
server0_hostname_or_ip_address
server1_hostname_or_ip_address
server2_hostname_or_ip_address

[new-debian-servers]
server3_hostname_or_ip_address
server4_hostname_or_ip_address

[new-rhel-servers]
server5_hostname_or_ip_address
server6_hostname_or_ip_address

Debian VPS setup

From the current directory:

ansible-playbook -i hosts.ini debian-setup.yml -u root 

RHEL-compatible VPS

RHEL-compatible = Rocky Linux, AlmaLinux, CentOS Stream, RHEL, or Fedora.

From the current directory:

ansible-playbook -i hosts.ini rhel-setup.yml -u root

Reboot check on existing servers

I have my servers configured to install updates automatically. This requires a reboot if the updates included the kernel, core libraries, or systemd. The reboot_check.yml playbook checks if any server needs a reboot, and then initiates the reboot.

ansible-playbook -i hosts.ini reboot_check.yml