2023-04-27 01:05:24 +02:00
|
|
|
---
|
|
|
|
- name: Copy sshd_config
|
2024-10-08 04:13:38 +02:00
|
|
|
ansible.builtin.template:
|
2024-09-19 23:10:00 +02:00
|
|
|
src: templates/ssh/sshd_config
|
2023-04-27 01:05:24 +02:00
|
|
|
dest: /etc/ssh/sshd_config
|
2024-10-08 04:13:38 +02:00
|
|
|
mode: "644"
|
2024-09-19 23:10:00 +02:00
|
|
|
notify:
|
|
|
|
- Restart sshd
|
2024-10-08 04:13:38 +02:00
|
|
|
become: true
|
2023-04-27 01:05:24 +02:00
|
|
|
|
2023-07-12 00:02:17 +02:00
|
|
|
- name: Copy pubkey
|
2024-10-08 04:13:38 +02:00
|
|
|
ansible.builtin.copy:
|
2023-07-12 00:02:17 +02:00
|
|
|
content: "{{ pubkey }}"
|
|
|
|
dest: "/home/{{ user }}/.ssh/authorized_keys"
|
|
|
|
owner: "{{ user }}"
|
|
|
|
group: "{{ user }}"
|
|
|
|
mode: "644"
|