All checks were successful
ansible-lint / Ansible Lint (push) Successful in 13s
Gitleaks Scan / gitleaks (push) Successful in 4s
Markdown Lint / markdown-lint (push) Successful in 5s
ai-reviews / Review PR (pull_request) Successful in 12s
PR check / Gitleaks (pull_request) Successful in 4s
PR check / lint tests (pull_request) Successful in 15s
PR check / labeler (pull_request) Successful in 3s
PR check / handle_failures (pull_request) Has been skipped
PR check / handle_success (pull_request) Successful in 2s
This commit introduces a new task that facilitates the import of fail2ban configuration files into the system. This enhancement allows for automated and consistent management of security settings, improving the overall security posture.
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
---
|
|
# ansible_role_proxmox_provision/tasks/main.yml
|
|
# Main tasks for role
|
|
# ===================
|
|
|
|
- name: Ensure we are running on Proxmox
|
|
ansible.builtin.stat:
|
|
path: /usr/bin/pveversion
|
|
register: proxmox_check
|
|
|
|
- name: Stop if not Proxmox
|
|
ansible.builtin.fail:
|
|
msg: "This role must run on Proxmox VE nodes only."
|
|
when: not proxmox_check.stat.exists
|
|
|
|
# Other tasks
|
|
# ===================
|
|
|
|
- name: Configure apt
|
|
ansible.builtin.import_tasks: apt.yml
|
|
|
|
- name: Disable enterprise repo, enable no-subscription
|
|
ansible.builtin.import_tasks: repos.yml
|
|
|
|
- name: Disable swap or tune it
|
|
ansible.builtin.import_tasks: swap.yml
|
|
|
|
- name: Install api utilities
|
|
ansible.builtin.import_tasks: utilities.yml
|
|
|
|
- name: Remove the infamous subscription nag
|
|
ansible.builtin.import_tasks: subscription.yml
|
|
|
|
- name: Stop logs from quietly murdering the disk
|
|
ansible.builtin.import_tasks: logrotate.yml
|
|
|
|
- name: Install powertop, auto-tune, and make it persistent
|
|
ansible.builtin.import_tasks: powertop.yml
|
|
|
|
- name: Configure kernel panic auto-reboot
|
|
ansible.builtin.import_tasks: kernel.yml
|
|
|
|
- name: Configure ram usage
|
|
ansible.builtin.import_tasks: ram.yml
|
|
|
|
- name: SetUp fail2ban
|
|
ansible.builtin.import_tasks: fail2ban.yml
|