29 lines
604 B
YAML
29 lines
604 B
YAML
---
|
|
- name: Copy user sshd_config
|
|
ansible.builtin.template:
|
|
src: files/ssh/user/sshd_config
|
|
dest: /etc/ssh/sshd_config
|
|
mode: "644"
|
|
backup: true
|
|
notify:
|
|
- Restart sshd
|
|
become: true
|
|
when: ansible_user_id != "root"
|
|
|
|
- name: Copy root sshd_config
|
|
ansible.builtin.template:
|
|
src: files/ssh/root/sshd_config
|
|
dest: /etc/ssh/sshd_config
|
|
mode: "644"
|
|
backup: true
|
|
notify:
|
|
- Restart sshd
|
|
when: ansible_user_id == "root"
|
|
|
|
- name: Copy pubkey
|
|
ansible.builtin.copy:
|
|
src: files/ssh/vault-ca.pub
|
|
dest: "/etc/ssh/vault-ca.pub"
|
|
mode: "644"
|
|
become: true
|