Added ssh configuration
This commit is contained in:
parent
99597b4e30
commit
e6cb514231
@ -3,5 +3,6 @@
|
|||||||
connection: local
|
connection: local
|
||||||
roles:
|
roles:
|
||||||
- { role: packages, become: true}
|
- { role: packages, become: true}
|
||||||
|
- { role: ssh, become: true}
|
||||||
- configs
|
- configs
|
||||||
|
|
||||||
|
4
ansible/base-system/roles/ssh/handlers/main.yml
Normal file
4
ansible/base-system/roles/ssh/handlers/main.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
- name: Reload sshd
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: sshd
|
||||||
|
state: restarted
|
@ -1,18 +1,12 @@
|
|||||||
---
|
---
|
||||||
|
- name: Put authorized keys
|
||||||
|
template:
|
||||||
|
src: files/auth_keys
|
||||||
|
dest: /etc/ssh/auth_keys
|
||||||
|
|
||||||
- name: Put authorized keys
|
- name: Put sshd config
|
||||||
template:
|
template:
|
||||||
src: files/auth_keys
|
src: files/sshd_config
|
||||||
dest: /etc/ssh/auth_keys
|
dest: /etc/ssh/sshd_config
|
||||||
|
notify: Reload sshd
|
||||||
- name: Put sshd config
|
|
||||||
template:
|
|
||||||
src: files/sshd_config
|
|
||||||
dest: /etc/ssh/sshd_config
|
|
||||||
notify: Reload sshd
|
|
||||||
|
|
||||||
- name: Reload sshd
|
|
||||||
ansible.builtin.service:
|
|
||||||
name: sshd
|
|
||||||
state: restarted
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user