aboutsummaryrefslogtreecommitdiff
path: root/roles/host/handlers
diff options
context:
space:
mode:
authorspmfox <spmfox@foxwd.com>2025-04-23 22:22:39 -0400
committerspmfox <spmfox@foxwd.com>2025-04-23 22:22:39 -0400
commit87a216322a8a858b35ffb1a426ebbadc1395c0df (patch)
treebe354c436fb5f30422b2a3f43c5cf852da2735e6 /roles/host/handlers
parent33af7561882425e6e1a2d3ed56e46f2c5a10033f (diff)
Added handler logic in host role, added ssh hardening
Diffstat (limited to 'roles/host/handlers')
-rw-r--r--roles/host/handlers/main.yml11
1 files changed, 11 insertions, 0 deletions
diff --git a/roles/host/handlers/main.yml b/roles/host/handlers/main.yml
new file mode 100644
index 0000000..501bfeb
--- /dev/null
+++ b/roles/host/handlers/main.yml
@@ -0,0 +1,11 @@
+- name: Restart sshd
+ ansible.builtin.service:
+ name: "sshd"
+ state: "restarted"
+
+- name: Reload systemd daemon
+ ansible.builtin.systemd_service:
+ daemon_reload: true
+
+- name: Reload sysctl
+ ansible.builtin.shell: "sysctl -p /etc/sysctl.d/50-UnprivilegedPort.conf"