This commit introduces the foundational Ansible playbooks, roles, and configurations for automated provisioning of both production and test environments. Key capabilities include: - **Base System Setup:** Common packages, timezone, chrony, and hostname. - **Security Hardening:** SELinux disable, SSH configuration, `dnf-automatic`, `fail2ban`, `firewalld` setup, and `journald` log limits. - **Docker & Swarm:** Docker installation and configuration, Docker Swarm initialization/joining for managers and workers, overlay network creation, and node labeling. - **Storage:** Hetzner StorageBox integration using `davfs2`. - **Directory Structure:** Creation of application and database-specific directories. This establishes a comprehensive, automated pipeline for infrastructure deployment and initial configuration.
47 lines
814 B
YAML
47 lines
814 B
YAML
---
|
|
- name: Update all packages
|
|
ansible.builtin.dnf:
|
|
name: "*"
|
|
state: latest
|
|
update_cache: yes
|
|
|
|
- name: Install EPEL release
|
|
ansible.builtin.dnf:
|
|
name: epel-release
|
|
state: present
|
|
|
|
- name: Install base packages
|
|
ansible.builtin.dnf:
|
|
name:
|
|
- curl
|
|
- wget
|
|
- git
|
|
- jq
|
|
- tar
|
|
- unzip
|
|
- bash-completion
|
|
- gettext
|
|
- tree
|
|
- ca-certificates
|
|
- fail2ban
|
|
- chrony
|
|
- python3
|
|
- python3-pip
|
|
- htop
|
|
- btop
|
|
state: present
|
|
|
|
- name: Set timezone
|
|
community.general.timezone:
|
|
name: "{{ timezone }}"
|
|
|
|
- name: Ensure chrony is running
|
|
ansible.builtin.service:
|
|
name: chronyd
|
|
state: started
|
|
enabled: yes
|
|
|
|
- name: Set hostname
|
|
ansible.builtin.hostname:
|
|
name: "{{ inventory_hostname }}"
|