@@ -1,5 +1,6 @@
|
||||
---
|
||||
- include_tasks: time.yml
|
||||
- include_tasks: essential.yml
|
||||
- include_tasks: sshd.yml
|
||||
- include_tasks: aya01_fstab.yml
|
||||
when: inventory_hostname == "aya01"
|
||||
|
||||
15
roles/common/tasks/sshd.yml
Normal file
15
roles/common/tasks/sshd.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
- name: Copy sshd_config
|
||||
template:
|
||||
src: templates/common/ssh/sshd_config
|
||||
dest: /etc/ssh/sshd_config
|
||||
mode: 0644
|
||||
become: yes
|
||||
register: sshd
|
||||
|
||||
- name: Restart sshd
|
||||
service:
|
||||
name: "sshd"
|
||||
state: "restarted"
|
||||
become: yes
|
||||
when: sshd.changed
|
||||
Reference in New Issue
Block a user