- 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>
34 lines
795 B
YAML
34 lines
795 B
YAML
---
|
|
- 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 |