Include file utility, and prefer ed25519 ssh keys.

This commit is contained in:
Brian Lee 2023-07-14 10:12:06 -07:00
parent 448658b6fe
commit 248332c3aa
2 changed files with 13 additions and 0 deletions

View File

@ -20,3 +20,15 @@
ansible.builtin.package: ansible.builtin.package:
state: present state: present
name: "{{ sysadmin_packages }}" name: "{{ sysadmin_packages }}"
- name: Generate ed25519 SSH host key
ansible.builtin.command:
cmd: ssh-keygen -A
creates: /etc/ssh/ssh_host_ed25519_key
- name: Prefer ed25519 HostKeys in sshd_config
ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config
regex: 'HostKey /etc/ssh/ssh_host_ed25519_key'
line: 'HostKey /etc/ssh/ssh_host_ed25519_key'
state: present

View File

@ -1,6 +1,7 @@
--- ---
sysadmin_packages: sysadmin_packages:
- curl - curl
- file
- dnsutils - dnsutils
- git - git
- gpg - gpg