Reorganise
This commit is contained in:
parent
4be4c0a719
commit
2722973e49
19 changed files with 161 additions and 255 deletions
26
roles/sshd/tasks/main.yml
Normal file
26
roles/sshd/tasks/main.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
- name: Add SSH Key - fern@muskduck
|
||||
ansible.posix.authorized_key:
|
||||
user: fern
|
||||
state: present
|
||||
key: "{{ lookup('file', '/home/fern/.ssh/id_ed25519.pub') }}"
|
||||
|
||||
- name: Add SSH Key - YubiKey
|
||||
ansible.posix.authorized_key:
|
||||
user: fern
|
||||
state: present
|
||||
key: "{{ lookup('file', '/home/fern/.ssh/id_ed25519_sk.pub') }}"
|
||||
|
||||
- name: Add SSH Key - fairywren
|
||||
ansible.posix.authorized_key:
|
||||
user: fern
|
||||
state: present
|
||||
key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO8W3zggrj6ml/VZWem9l21SWK3yffgw5RkdgF6fG6jo u0_a336@localhostsk-ssh-ed25519@openssh.com"
|
||||
|
||||
- name: Disable root login
|
||||
become: true
|
||||
lineinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: "^PermitRootLogin"
|
||||
line: "PermitRootLogin no"
|
||||
backup: yes
|
||||
notify: restart sshd
|
Loading…
Add table
Add a link
Reference in a new issue