Move ssh to role
This commit is contained in:
parent
585e71c2a4
commit
90379a77b5
1
roles/ssh/files/authorized_keys
Normal file
1
roles/ssh/files/authorized_keys
Normal file
@ -0,0 +1 @@
|
|||||||
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDwTqV2idle6AQj179tAuAxZzodtTb2aMJKIEnL+tXfdsKsoc8kfQV3JMtq53hk6jRcH/9+FamCBqP/2s1xT4elKAZ7GWYBMi4HqGr8Qr7I1sK2m9dydrmW+iepmhGNDdKlYkEFc8aM9blbCTEN9RqqJiSomzDAIZQWiV2E/18MIxu3WYKJ561uzILkmB9o7UJbdAgOGbk6+GkBIwGCX5CwlX4Ro8wLv/i55/bg03N1lAbsCeDqaZX7ikiy2hnxAFH/EuY2g2WK4x9yUjhUe1MnCZy5SealSP76b9BHyJVYrxGVyAZOtlnewEXzbJXnyHGQg00hXeT8YtTlMSXaQVih pgrondek@farnsworth
|
7
roles/ssh/tasks/install.yml
Normal file
7
roles/ssh/tasks/install.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: install ssh
|
||||||
|
become: yes
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
pkg:
|
||||||
|
- openssh-server
|
5
roles/ssh/tasks/keys.yml
Normal file
5
roles/ssh/tasks/keys.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- name: copy authorized_keys
|
||||||
|
copy:
|
||||||
|
src: authorized_keys
|
||||||
|
dest: ${HOME}/.ssh/authorized_keys
|
4
roles/ssh/tasks/main.yml
Normal file
4
roles/ssh/tasks/main.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
- import_tasks: install.yml
|
||||||
|
|
||||||
|
- import_tasks: keys.yml
|
@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
- name: copy ssh keys
|
|
||||||
hosts: server
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
- name: copy authorized_keys
|
|
||||||
copy:
|
|
||||||
src: authorized_keys
|
|
||||||
dest: ${HOME}/.ssh/authorized_keys
|
|
Loading…
Reference in New Issue
Block a user