Created a role for initial lockdown of recent VPS, and started role for basic server configuration
This commit is contained in:
13
.ansible/roles/lockdown/handlers/main.yml
Normal file
13
.ansible/roles/lockdown/handlers/main.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
# SPDX-License-Identifier: MIT-0
|
||||
---
|
||||
# handlers file for lockdown
|
||||
- name: Restart SSH server
|
||||
when: ansible_facts["user_id"] == "root"
|
||||
ansible.builtin.service:
|
||||
name: ssh
|
||||
state: restarted
|
||||
tags:
|
||||
- default
|
||||
- restart_ssh
|
||||
register: restarted_ssh
|
||||
listen: "restart ssh"
|
Reference in New Issue
Block a user