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.
30 lines
661 B
YAML
30 lines
661 B
YAML
---
|
|
- name: Create base directory
|
|
ansible.builtin.file:
|
|
path: /opt/iklimco
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: Create app specific directories
|
|
ansible.builtin.file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
mode: '0755'
|
|
loop:
|
|
- /opt/iklimco/ssl
|
|
- /opt/iklimco/init
|
|
- /opt/iklimco/init/postgresql
|
|
- /opt/iklimco/init/mongodb
|
|
- /opt/iklimco/stacks
|
|
when: inventory_hostname in groups['app']
|
|
|
|
- name: Create db specific directories
|
|
ansible.builtin.file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
mode: '0755'
|
|
loop:
|
|
- /opt/iklimco/db
|
|
- /opt/iklimco/backup
|
|
when: inventory_hostname in groups['db']
|