mirror of
https://github.com/cole-maxwell1/todo-hetzner.git
synced 2026-10-27 19:02:49 -05:00
feat: add Hetzner-hosted todo application stack
Implement the server-rendered Go todo application with PostgreSQL persistence, Tailwind styling, health checks, and test coverage. Provision production and staging infrastructure with OpenTofu, including private networking, static IPs, Object Storage backups, and load balancing. Configure Rocky Linux hosts with Ansible, rootless Podman, PostgreSQL, WAL-G backup automation, staging restores, and generated inventory.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
---
|
||||
- name: Install operating system packages
|
||||
ansible.builtin.dnf:
|
||||
name:
|
||||
- ca-certificates
|
||||
- curl
|
||||
- policycoreutils-python-utils
|
||||
- podman
|
||||
- postgresql-server
|
||||
- postgresql-contrib
|
||||
- sudo
|
||||
- tar
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Create rootless application user
|
||||
ansible.builtin.user:
|
||||
name: "{{ app_user }}"
|
||||
create_home: true
|
||||
shell: /bin/bash
|
||||
state: present
|
||||
register: app_user_result
|
||||
|
||||
- name: Store application user ID
|
||||
ansible.builtin.set_fact:
|
||||
app_user_uid: "{{ app_user_result.uid }}"
|
||||
|
||||
- name: Enable linger for application user
|
||||
ansible.builtin.command:
|
||||
argv: [loginctl, enable-linger, "{{ app_user }}"]
|
||||
args:
|
||||
creates: "/var/lib/systemd/linger/{{ app_user }}"
|
||||
|
||||
- name: Start application user manager
|
||||
ansible.builtin.systemd_service:
|
||||
name: "user@{{ app_user_uid }}.service"
|
||||
state: started
|
||||
Reference in New Issue
Block a user