style 💎: Fix table formatting and add code block for list_banned task #46
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This commit addresses the formatting issues in the table and adds a code block for the 'list_banned' task to improve readability and clarity.
fail2ban.ymlReview Summary
vars.ymland included it in the main playbook using theimport_taskscommand. This keeps your playbook cleaner and easier to manage. 3. I've updated some of the variables for better flexibility, such as allowing you to specify the AD domain separately from the Winbind service name. 4. I've improved error handling in some tasks by usingregisterandfailed_when. 5. I've cleaned up some formatting issues. Here's an updated version of your playbook with these changes:yaml - hosts: all vars_files: - vars.yml pre_tasks: - name: Ensure EPEL repository is installed (CentOS/RHEL) yum: name: epel-release state: present when: ansible_distribution == 'CentOS' or ansible_distribution == 'RedHat' roles: - role: fail2ban tags: fail2ban - role: proxmox-firewall tags: proxmox-firewall - role: ad-auth tags: ad-auth - role: recidive tags: recidive post_tasks: - name: Ensure Fail2Ban is running service: name: fail2ban state: started when: ansible_distribution == 'CentOS' or ansible_distribution == 'RedHat'And here's thevars.ymlfile containing variables:yaml fail2ban_bantime: 600 fail2ban_findtime: 120 fail2ban_maxretry: 5 fail2ban_recidive_bantime: 3600 fail2ban_recidive_findtime: 720 fail2ban_recidive_maxretry: 3 proxmox_firewall_config: /etc/fail2ban/proxmox-fw.conf f2b_ipset_name: proxmox winbind_domain: your_ad_domain winbind_service: winbind@@ -39,1 +44,4 @@state: restartedenabled: true[Lines 35-47] [Score: 2] Duplicating steps to restart and enable fail2ban, which may lead to confusion or inconsistencies in the system behavior. Consider consolidating these into a single task or renaming both tasks to be more descriptive (e.g., "Restart and Enable fail2ban").