- /inventories/hosts.yml - /inventories/group_vars/all.yml - /inventories/group_vars/gateway.yml - /roles/proxmox_lxc/tasks/main.yml - /roles/base_setup/tasks/ssh.yml - /roles/base_setup/tasks/main.yml - /roles/base_setup/handlers/main.yml - /roles/npm/tasks/main.yml - /roles/heimdall/tasks/main.yml - /README.md - /olimp-deploy.yml - /vault.yml
21 lines
486 B
YAML
21 lines
486 B
YAML
---
|
|
- name: Disable SSH password authentication
|
|
lineinfile:
|
|
path: /etc/ssh/sshd_config
|
|
regexp: '^#?PasswordAuthentication'
|
|
line: 'PasswordAuthentication no'
|
|
state: present
|
|
notify: restart ssh
|
|
|
|
- name: Ensure SSH directory exists
|
|
file:
|
|
path: /root/.ssh
|
|
state: directory
|
|
mode: '0700'
|
|
|
|
- name: Add SSH public keys for root access
|
|
authorized_key:
|
|
user: root
|
|
key: "{{ item }}"
|
|
state: present
|
|
loop: "{{ ssh_public_keys }}" |