Init
This commit is contained in:
22
roles/ssh/tasks/main.yml
Normal file
22
roles/ssh/tasks/main.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
- name: Put authorized keys
|
||||
template:
|
||||
src: files/auth_keys
|
||||
dest: /etc/ssh/auth_keys
|
||||
|
||||
- name: Put sshd config
|
||||
template:
|
||||
src: files/sshd_config
|
||||
dest: /etc/ssh/sshd_config
|
||||
notify: Reload sshd
|
||||
|
||||
- name: Set different SSH port
|
||||
lineinfile:
|
||||
dest: /etc/ssh/sshd_config
|
||||
state: present
|
||||
regexp: '^Port'
|
||||
line: 'Port 6666'
|
||||
validate: 'sshd -t -f %s'
|
||||
notify: Reload sshd
|
||||
when: "'publicservices' in group_names"
|
||||
|
||||
Reference in New Issue
Block a user