Initial commit - Security operations and hardening tools
- Added Ansible playbooks for security hardening (UFW, Fail2Ban) - Implemented SSH key management and host synchronization tools - Created UFW hardening scripts and network security configurations - Added Cockpit-Traefik reverse proxy setup documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
34
ufw-harden-playbook.yml
Normal file
34
ufw-harden-playbook.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
- name: Deploy and Execute UFW Hardening Script
|
||||
hosts: all
|
||||
become: true
|
||||
vars:
|
||||
ufw_script_path: /tmp/harden-ufw.sh
|
||||
|
||||
tasks:
|
||||
- name: Copy UFW hardening script to remote hosts
|
||||
copy:
|
||||
src: harden-ufw.sh
|
||||
dest: "{{ ufw_script_path }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
|
||||
- name: Execute UFW hardening script
|
||||
shell: "{{ ufw_script_path }}"
|
||||
register: ufw_output
|
||||
|
||||
- name: Display UFW configuration results
|
||||
debug:
|
||||
var: ufw_output.stdout_lines
|
||||
|
||||
- name: Clean up temporary script
|
||||
file:
|
||||
path: "{{ ufw_script_path }}"
|
||||
state: absent
|
||||
|
||||
- name: Restart Docker service to re-establish swarm connections
|
||||
systemd:
|
||||
name: docker
|
||||
state: restarted
|
||||
enabled: yes
|
||||
Reference in New Issue
Block a user