Murat ÖZDEMİR bbeaf97815 Implement: Administrative user, keyboard layout, and Ansible variable refactor
This commit introduces several core configurations and structural improvements:

*   **User Management:** Creates a new `iklim` administrative user with a securely hashed password, enabled by `python3-passlib`.
*   **System Configuration:** Sets the system keyboard layout to Turkish Q (`trq`).
*   **Security Hardening:** Refines firewall rules for SSH using a rich rule and ensures `journald` log limits file creation.
*   **Ansible Variable Management:** Restructures `group_vars` by consolidating global variables into `group_vars/all/vars.yml` and sensitive data into a dedicated `group_vars/all/vault.yml`.
*   **Ansible Compatibility:** Adds `!unsafe` to a `docker info` shell command to prevent future warnings.
2026-05-11 19:00:31 +03:00

57 lines
1.1 KiB
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
- python3-passlib
- 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 }}"
- name: Get current keymap
ansible.builtin.command: localectl status
register: localectl_status
changed_when: false
- name: Set keyboard layout to Turkish Q
ansible.builtin.command: localectl set-keymap trq
when: "'trq' not in localectl_status.stdout"