new playbook?

This commit is contained in:
kevinnlsamuel committed 2026-10-23 22:21:19 +05:30
1 parent 4d6fcdee6f
commit 999595a699
3 files changed
+26

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
---
- hosts:
- tmp.kevinnlsamuel.com
vars:
ansible_user: root
name: setup server natsuco
tasks:
- name: harden ssh
block:
- name: disable password auth
file:
src: sshd/00-nopasswd.conf
dest: /etc/ssh/ssh_config.d/00-altport.conf
- name: change ssh port
vars:
port: 1023
template:
src: sshd/00-altport.conf
dest: /etc/ssh/ssh_config.d/00-altport.conf
- name: install semanage
dnf:
state: present
name: policycoreutils-python-utils
- command: /usr/sbin/semanage port -a -t ssh_port_t -p tcp 1023