Add host nanna
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
---
|
||||
- name: Basic setup for nanna
|
||||
hosts: nanna
|
||||
tasks:
|
||||
- name: Configure sshd
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/ssh/sshd_config.d/00_pbri.conf
|
||||
mode: u=rw,g=r,o=r
|
||||
# Included by /etc/ssh/sshd_config before other configuration
|
||||
content: |
|
||||
Port 2309
|
||||
PermitRootLogin no
|
||||
PubkeyAuthentication yes
|
||||
AuthorizedKeysFile .ssh/authorized_keys
|
||||
PasswordAuthentication no
|
||||
validate: /usr/sbin/sshd -T -f %s
|
||||
notify:
|
||||
- Restart sshd
|
||||
|
||||
handlers:
|
||||
- name: Restart sshd
|
||||
become: true
|
||||
ansible.builtin.service:
|
||||
name: ssh
|
||||
state: restarted
|
||||
Reference in New Issue
Block a user