add .ssh check
This commit is contained in:
parent
1575a24766
commit
2925005ab8
@ -3,10 +3,20 @@
|
||||
package:
|
||||
name: "{{ system_ssh_package }}"
|
||||
state: present
|
||||
- name: ensure .ssh exist for user
|
||||
become: true
|
||||
file:
|
||||
state: directory
|
||||
path: "/home/{{item}}/.ssh"
|
||||
owner: "{{item}}"
|
||||
mode: 0700
|
||||
with_items:
|
||||
- "{{user.name}}"
|
||||
|
||||
- name: copy ssh config for user
|
||||
become: true
|
||||
template:
|
||||
dest: "/home/{{ item }}/.ssh"
|
||||
dest: "/home/{{ item }}/.ssh/config"
|
||||
src: "ssh/config.j2"
|
||||
force: true
|
||||
remote_src: false
|
||||
|
Loading…
Reference in New Issue
Block a user