27 lines
530 B
YAML
27 lines
530 B
YAML
---
|
|
|
|
- name: ssh configuration file
|
|
template:
|
|
src: sshd_config.j2
|
|
dest: /etc/ssh/sshd_config
|
|
notify:
|
|
- restart sshd
|
|
|
|
- name: ssh keys home
|
|
authorized_key:
|
|
user: root
|
|
state: present
|
|
key: "{{ lookup('file', 'ssh/home.id_rsa.pub') }}"
|
|
|
|
- name: ssh keys work
|
|
authorized_key:
|
|
user: root
|
|
state: present
|
|
key: "{{ lookup('file', 'ssh/work.id_rsa.pub') }}"
|
|
|
|
- name: remove old work key
|
|
authorized_key:
|
|
user: root
|
|
state: absent
|
|
key: "{{ lookup('file', 'ssh/work_old.id_rsa.pub')}}"
|